| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 std::unique_ptr<DelegateObtainer> delegate_obtainer, | 93 std::unique_ptr<DelegateObtainer> delegate_obtainer, |
| 94 bool); // resolve ambiguity | 94 bool); // resolve ambiguity |
| 95 | 95 |
| 96 // URLRequestJob: | 96 // URLRequestJob: |
| 97 void Start() override; | 97 void Start() override; |
| 98 void Kill() override; | 98 void Kill() override; |
| 99 int ReadRawData(net::IOBuffer* buf, int buf_size) override; | 99 int ReadRawData(net::IOBuffer* buf, int buf_size) override; |
| 100 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; | 100 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
| 101 bool GetMimeType(std::string* mime_type) const override; | 101 bool GetMimeType(std::string* mime_type) const override; |
| 102 bool GetCharset(std::string* charset) override; | 102 bool GetCharset(std::string* charset) override; |
| 103 int GetResponseCode() const override; | |
| 104 void GetResponseInfo(net::HttpResponseInfo* info) override; | 103 void GetResponseInfo(net::HttpResponseInfo* info) override; |
| 105 | 104 |
| 106 protected: | 105 protected: |
| 107 ~AndroidStreamReaderURLRequestJob() override; | 106 ~AndroidStreamReaderURLRequestJob() override; |
| 108 | 107 |
| 109 // Gets the TaskRunner for the worker thread. | 108 // Gets the TaskRunner for the worker thread. |
| 110 // Overridden in unittests. | 109 // Overridden in unittests. |
| 111 virtual base::TaskRunner* GetWorkerThreadRunner(); | 110 virtual base::TaskRunner* GetWorkerThreadRunner(); |
| 112 | 111 |
| 113 // Creates an InputStreamReader instance. | 112 // Creates an InputStreamReader instance. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 139 base::ThreadChecker thread_checker_; | 138 base::ThreadChecker thread_checker_; |
| 140 | 139 |
| 141 base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_; | 140 base::WeakPtrFactory<AndroidStreamReaderURLRequestJob> weak_factory_; |
| 142 | 141 |
| 143 DISALLOW_COPY_AND_ASSIGN(AndroidStreamReaderURLRequestJob); | 142 DISALLOW_COPY_AND_ASSIGN(AndroidStreamReaderURLRequestJob); |
| 144 }; | 143 }; |
| 145 | 144 |
| 146 } // namespace android_webview | 145 } // namespace android_webview |
| 147 | 146 |
| 148 #endif // ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ | 147 #endif // ANDROID_WEBVIEW_BROWSER_NET_ANDROID_STREAM_READER_URL_REQUEST_JOB_H_ |
| OLD | NEW |