| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void SetLoadFlags(int load_flags) override; | 54 void SetLoadFlags(int load_flags) override; |
| 55 int GetLoadFlags() const override; | 55 int GetLoadFlags() const override; |
| 56 void SetReferrer(const std::string& referrer) override; | 56 void SetReferrer(const std::string& referrer) override; |
| 57 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override; | 57 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override; |
| 58 void SetExtraRequestHeaders( | 58 void SetExtraRequestHeaders( |
| 59 const std::string& extra_request_headers) override; | 59 const std::string& extra_request_headers) override; |
| 60 void AddExtraRequestHeader(const std::string& header_line) override; | 60 void AddExtraRequestHeader(const std::string& header_line) override; |
| 61 void SetRequestContext( | 61 void SetRequestContext( |
| 62 URLRequestContextGetter* request_context_getter) override; | 62 URLRequestContextGetter* request_context_getter) override; |
| 63 void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override; | 63 void SetFirstPartyForCookies(const GURL& first_party_for_cookies) override; |
| 64 void SetRequestorOrigin(const url::Origin& requestor_origin) override; |
| 64 void SetURLRequestUserData( | 65 void SetURLRequestUserData( |
| 65 const void* key, | 66 const void* key, |
| 66 const CreateDataCallback& create_data_callback) override; | 67 const CreateDataCallback& create_data_callback) override; |
| 67 void SetStopOnRedirect(bool stop_on_redirect) override; | 68 void SetStopOnRedirect(bool stop_on_redirect) override; |
| 68 void SetAutomaticallyRetryOn5xx(bool retry) override; | 69 void SetAutomaticallyRetryOn5xx(bool retry) override; |
| 69 void SetMaxRetriesOn5xx(int max_retries) override; | 70 void SetMaxRetriesOn5xx(int max_retries) override; |
| 70 int GetMaxRetriesOn5xx() const override; | 71 int GetMaxRetriesOn5xx() const override; |
| 71 base::TimeDelta GetBackoffDelay() const override; | 72 base::TimeDelta GetBackoffDelay() const override; |
| 72 void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override; | 73 void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override; |
| 73 void SaveResponseToFileAtPath( | 74 void SaveResponseToFileAtPath( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 static int GetNumFetcherCores(); | 120 static int GetNumFetcherCores(); |
| 120 | 121 |
| 121 const scoped_refptr<URLFetcherCore> core_; | 122 const scoped_refptr<URLFetcherCore> core_; |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); | 124 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 } // namespace net | 127 } // namespace net |
| 127 | 128 |
| 128 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ | 129 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ |
| OLD | NEW |