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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 uint64 range_offset, | 43 uint64 range_offset, |
44 uint64 range_length, | 44 uint64 range_length, |
45 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; | 45 scoped_refptr<base::TaskRunner> file_task_runner) OVERRIDE; |
46 virtual void SetChunkedUpload( | 46 virtual void SetChunkedUpload( |
47 const std::string& upload_content_type) OVERRIDE; | 47 const std::string& upload_content_type) OVERRIDE; |
48 virtual void AppendChunkToUpload(const std::string& data, | 48 virtual void AppendChunkToUpload(const std::string& data, |
49 bool is_last_chunk) OVERRIDE; | 49 bool is_last_chunk) OVERRIDE; |
50 virtual void SetLoadFlags(int load_flags) OVERRIDE; | 50 virtual void SetLoadFlags(int load_flags) OVERRIDE; |
51 virtual int GetLoadFlags() const OVERRIDE; | 51 virtual int GetLoadFlags() const OVERRIDE; |
52 virtual void SetReferrer(const std::string& referrer) OVERRIDE; | 52 virtual void SetReferrer(const std::string& referrer) OVERRIDE; |
53 virtual void SetReferrerPolicy( | |
54 URLRequest::ReferrerPolicy referrer_policy) OVERRIDE; | |
55 virtual void SetExtraRequestHeaders( | 53 virtual void SetExtraRequestHeaders( |
56 const std::string& extra_request_headers) OVERRIDE; | 54 const std::string& extra_request_headers) OVERRIDE; |
57 virtual void AddExtraRequestHeader(const std::string& header_line) OVERRIDE; | 55 virtual void AddExtraRequestHeader(const std::string& header_line) OVERRIDE; |
58 virtual void SetRequestContext( | 56 virtual void SetRequestContext( |
59 URLRequestContextGetter* request_context_getter) OVERRIDE; | 57 URLRequestContextGetter* request_context_getter) OVERRIDE; |
60 virtual void SetFirstPartyForCookies( | 58 virtual void SetFirstPartyForCookies( |
61 const GURL& first_party_for_cookies) OVERRIDE; | 59 const GURL& first_party_for_cookies) OVERRIDE; |
62 virtual void SetURLRequestUserData( | 60 virtual void SetURLRequestUserData( |
63 const void* key, | 61 const void* key, |
64 const CreateDataCallback& create_data_callback) OVERRIDE; | 62 const CreateDataCallback& create_data_callback) OVERRIDE; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 static int GetNumFetcherCores(); | 118 static int GetNumFetcherCores(); |
121 | 119 |
122 const scoped_refptr<URLFetcherCore> core_; | 120 const scoped_refptr<URLFetcherCore> core_; |
123 | 121 |
124 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 122 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
125 }; | 123 }; |
126 | 124 |
127 } // namespace net | 125 } // namespace net |
128 | 126 |
129 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 127 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
OLD | NEW |