| 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 // This file contains URLFetcher, a wrapper around URLRequest that handles | 5 // This file contains URLFetcher, a wrapper around URLRequest that handles |
| 6 // low-level details like thread safety, ref counting, and incremental buffer | 6 // low-level details like thread safety, ref counting, and incremental buffer |
| 7 // reading. This is useful for callers who simply want to get the data from a | 7 // reading. This is useful for callers who simply want to get the data from a |
| 8 // URL and don't care about all the nitty-gritty details. | 8 // URL and don't care about all the nitty-gritty details. |
| 9 // | 9 // |
| 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a | 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // URLFetcher implementation: | 39 // URLFetcher implementation: |
| 40 void SetUploadData(const std::string& upload_content_type, | 40 void SetUploadData(const std::string& upload_content_type, |
| 41 const std::string& upload_content) override; | 41 const std::string& upload_content) override; |
| 42 void SetUploadFilePath( | 42 void SetUploadFilePath( |
| 43 const std::string& upload_content_type, | 43 const std::string& upload_content_type, |
| 44 const base::FilePath& file_path, | 44 const base::FilePath& file_path, |
| 45 uint64 range_offset, | 45 uint64 range_offset, |
| 46 uint64 range_length, | 46 uint64 range_length, |
| 47 scoped_refptr<base::TaskRunner> file_task_runner) override; | 47 scoped_refptr<base::TaskRunner> file_task_runner) override; |
| 48 void SetUploadStream(const std::string& upload_content_type, |
| 49 scoped_ptr<net::UploadDataStream> stream) override; |
| 48 void SetChunkedUpload(const std::string& upload_content_type) override; | 50 void SetChunkedUpload(const std::string& upload_content_type) override; |
| 49 void AppendChunkToUpload(const std::string& data, | 51 void AppendChunkToUpload(const std::string& data, |
| 50 bool is_last_chunk) override; | 52 bool is_last_chunk) override; |
| 51 void SetLoadFlags(int load_flags) override; | 53 void SetLoadFlags(int load_flags) override; |
| 52 int GetLoadFlags() const override; | 54 int GetLoadFlags() const override; |
| 53 void SetReferrer(const std::string& referrer) override; | 55 void SetReferrer(const std::string& referrer) override; |
| 54 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override; | 56 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override; |
| 55 void SetExtraRequestHeaders( | 57 void SetExtraRequestHeaders( |
| 56 const std::string& extra_request_headers) override; | 58 const std::string& extra_request_headers) override; |
| 57 void AddExtraRequestHeader(const std::string& header_line) override; | 59 void AddExtraRequestHeader(const std::string& header_line) override; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 static int GetNumFetcherCores(); | 118 static int GetNumFetcherCores(); |
| 117 | 119 |
| 118 const scoped_refptr<URLFetcherCore> core_; | 120 const scoped_refptr<URLFetcherCore> core_; |
| 119 | 121 |
| 120 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 122 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace net | 125 } // namespace net |
| 124 | 126 |
| 125 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 127 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
| OLD | NEW |