diff options
author | Torne (Richard Coles) <torne@google.com> | 2013-11-28 11:55:43 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2013-11-28 11:55:43 +0000 |
commit | f2477e01787aa58f445919b809d89e252beef54f (patch) | |
tree | 2db962b4af39f0db3a5f83b314373d0530c484b8 /android_webview/native/intercepted_request_data_impl.cc | |
parent | 7daea1dd5ff7e419322de831b642d81af3247912 (diff) | |
download | chromium_org-f2477e01787aa58f445919b809d89e252beef54f.tar.gz |
Merge from Chromium at DEPS revision 237746
This commit was generated by merge_to_master.py.
Change-Id: I8997af4cddfeb09a7c26f7e8e672c712cab461ea
Diffstat (limited to 'android_webview/native/intercepted_request_data_impl.cc')
-rw-r--r-- | android_webview/native/intercepted_request_data_impl.cc | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/android_webview/native/intercepted_request_data_impl.cc b/android_webview/native/intercepted_request_data_impl.cc index dc5fe225b2..8b583dfd58 100644 --- a/android_webview/native/intercepted_request_data_impl.cc +++ b/android_webview/native/intercepted_request_data_impl.cc @@ -4,7 +4,6 @@ #include "android_webview/native/intercepted_request_data_impl.h" -#include "android_webview/browser/net/android_stream_reader_url_request_job.h" #include "android_webview/native/input_stream_impl.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" @@ -16,48 +15,6 @@ using base::android::ScopedJavaLocalRef; namespace android_webview { -namespace { - -class StreamReaderJobDelegateImpl : - public AndroidStreamReaderURLRequestJob::Delegate { - public: - StreamReaderJobDelegateImpl( - const InterceptedRequestDataImpl* intercepted_request_data) - : intercepted_request_data_impl_(intercepted_request_data) { - DCHECK(intercepted_request_data_impl_); - } - - virtual scoped_ptr<InputStream> OpenInputStream( - JNIEnv* env, - const GURL& url) OVERRIDE { - return intercepted_request_data_impl_->GetInputStream(env).Pass(); - } - - virtual void OnInputStreamOpenFailed(net::URLRequest* request, - bool* restart) OVERRIDE { - *restart = false; - } - - virtual bool GetMimeType(JNIEnv* env, - net::URLRequest* request, - android_webview::InputStream* stream, - std::string* mime_type) OVERRIDE { - return intercepted_request_data_impl_->GetMimeType(env, mime_type); - } - - virtual bool GetCharset(JNIEnv* env, - net::URLRequest* request, - android_webview::InputStream* stream, - std::string* charset) OVERRIDE { - return intercepted_request_data_impl_->GetCharset(env, charset); - } - - private: - const InterceptedRequestDataImpl* intercepted_request_data_impl_; -}; - -} // namespace - InterceptedRequestDataImpl::InterceptedRequestDataImpl( const base::android::JavaRef<jobject>& obj) : java_object_(obj) { @@ -99,13 +56,4 @@ bool RegisterInterceptedRequestData(JNIEnv* env) { return RegisterNativesImpl(env); } -net::URLRequestJob* InterceptedRequestDataImpl::CreateJobFor( - net::URLRequest* request, - net::NetworkDelegate* network_delegate) const { - scoped_ptr<AndroidStreamReaderURLRequestJob::Delegate> - stream_reader_job_delegate_impl(new StreamReaderJobDelegateImpl(this)); - return new AndroidStreamReaderURLRequestJob( - request, network_delegate, stream_reader_job_delegate_impl.Pass()); -} - } // namespace android_webview |