Chromium Code Reviews| Index: android_webview/native/android_stream_reader_url_request_job.h |
| diff --git a/android_webview/native/android_stream_reader_url_request_job.h b/android_webview/native/android_stream_reader_url_request_job.h |
| index 2e465725b55a4f1db6d3706a9dc395cc1a150838..e29acd86e90045dfcb2265d78d2d80fc217e9c53 100644 |
| --- a/android_webview/native/android_stream_reader_url_request_job.h |
| +++ b/android_webview/native/android_stream_reader_url_request_job.h |
| @@ -7,6 +7,7 @@ |
| #include "base/android/scoped_java_ref.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/memory/weak_ptr.h" |
| #include "base/threading/non_thread_safe.h" |
| #include "net/http/http_byte_range.h" |
| #include "net/url_request/url_request_job.h" |
| @@ -43,7 +44,7 @@ class AndroidStreamReaderURLRequestJob : public net::URLRequestJob { |
| virtual ~Delegate() {} |
| }; |
| - explicit AndroidStreamReaderURLRequestJob( |
| + AndroidStreamReaderURLRequestJob( |
| net::URLRequest* request, |
| net::NetworkDelegate* network_delegate, |
| scoped_ptr<Delegate> delegate); |
| @@ -68,10 +69,13 @@ class AndroidStreamReaderURLRequestJob : public net::URLRequestJob { |
| // Skip to the first byte of the requested read range. |
| bool SkipToRequestedRange(JNIEnv* env); |
| + void StartAsync(); |
| + |
| net::HttpByteRange byte_range_; |
| scoped_ptr<Delegate> delegate_; |
| base::android::ScopedJavaGlobalRef<jobject> stream_; |
| base::android::ScopedJavaGlobalRef<jbyteArray> buffer_; |
| + base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_; |
|
joth
2012/10/15 17:01:46
net::URLRequestJob is refcounted, so it feels like
mnaganov (inactive)
2012/10/15 17:18:25
I was following the practice that the majority of
mkosiba (inactive)
2012/10/15 17:24:03
hmm.. all of the other URLRequestJob impls use a w
|
| DISALLOW_COPY_AND_ASSIGN(AndroidStreamReaderURLRequestJob); |
| }; |