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 26 matching lines...) Expand all Loading... |
37 RequestType request_type, | 37 RequestType request_type, |
38 URLFetcherDelegate* d); | 38 URLFetcherDelegate* d); |
39 ~URLFetcherImpl() override; | 39 ~URLFetcherImpl() override; |
40 | 40 |
41 // URLFetcher implementation: | 41 // URLFetcher implementation: |
42 void SetUploadData(const std::string& upload_content_type, | 42 void SetUploadData(const std::string& upload_content_type, |
43 const std::string& upload_content) override; | 43 const std::string& upload_content) override; |
44 void SetUploadFilePath( | 44 void SetUploadFilePath( |
45 const std::string& upload_content_type, | 45 const std::string& upload_content_type, |
46 const base::FilePath& file_path, | 46 const base::FilePath& file_path, |
47 uint64 range_offset, | 47 uint64_t range_offset, |
48 uint64 range_length, | 48 uint64_t range_length, |
49 scoped_refptr<base::TaskRunner> file_task_runner) override; | 49 scoped_refptr<base::TaskRunner> file_task_runner) override; |
50 void SetUploadStreamFactory( | 50 void SetUploadStreamFactory( |
51 const std::string& upload_content_type, | 51 const std::string& upload_content_type, |
52 const CreateUploadStreamCallback& callback) override; | 52 const CreateUploadStreamCallback& callback) override; |
53 void SetChunkedUpload(const std::string& upload_content_type) override; | 53 void SetChunkedUpload(const std::string& upload_content_type) override; |
54 void AppendChunkToUpload(const std::string& data, | 54 void AppendChunkToUpload(const std::string& data, |
55 bool is_last_chunk) override; | 55 bool is_last_chunk) override; |
56 void SetLoadFlags(int load_flags) override; | 56 void SetLoadFlags(int load_flags) override; |
57 int GetLoadFlags() const override; | 57 int GetLoadFlags() const override; |
58 void SetReferrer(const std::string& referrer) override; | 58 void SetReferrer(const std::string& referrer) override; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 static int GetNumFetcherCores(); | 124 static int GetNumFetcherCores(); |
125 | 125 |
126 const scoped_refptr<URLFetcherCore> core_; | 126 const scoped_refptr<URLFetcherCore> core_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 128 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace net | 131 } // namespace net |
132 | 132 |
133 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 133 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
OLD | NEW |