| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_URL_FETCHER_H_ | 10 #ifndef CHROME_BROWSER_URL_FETCHER_H_ |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 // call this before the request is started. |upload_content_type| is the MIME | 119 // call this before the request is started. |upload_content_type| is the MIME |
| 120 // type of the content, while |upload_content| is the data to be sent (the | 120 // type of the content, while |upload_content| is the data to be sent (the |
| 121 // Content-Length header value will be set to the length of this data). | 121 // Content-Length header value will be set to the length of this data). |
| 122 void set_upload_data(const std::string& upload_content_type, | 122 void set_upload_data(const std::string& upload_content_type, |
| 123 const std::string& upload_content); | 123 const std::string& upload_content); |
| 124 | 124 |
| 125 // Set one or more load flags as defined in net/base/load_flags.h. Must be | 125 // Set one or more load flags as defined in net/base/load_flags.h. Must be |
| 126 // called before the request is started. | 126 // called before the request is started. |
| 127 void set_load_flags(int load_flags); | 127 void set_load_flags(int load_flags); |
| 128 | 128 |
| 129 // Returns the current load flags. |
| 130 int load_flags() const; |
| 131 |
| 129 // Set extra headers on the request. Must be called before the request | 132 // Set extra headers on the request. Must be called before the request |
| 130 // is started. | 133 // is started. |
| 131 void set_extra_request_headers(const std::string& extra_request_headers); | 134 void set_extra_request_headers(const std::string& extra_request_headers); |
| 132 | 135 |
| 133 // Set the URLRequestContext on the request. Must be called before the | 136 // Set the URLRequestContext on the request. Must be called before the |
| 134 // request is started. | 137 // request is started. |
| 135 void set_request_context(URLRequestContext* request_context); | 138 void set_request_context(URLRequestContext* request_context); |
| 136 | 139 |
| 137 // Retrieve the response headers from the request. Must only be called after | 140 // Retrieve the response headers from the request. Must only be called after |
| 138 // the OnURLFetchComplete callback has run. | 141 // the OnURLFetchComplete callback has run. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 163 scoped_refptr<Core> core_; | 166 scoped_refptr<Core> core_; |
| 164 | 167 |
| 165 static Factory* factory_; | 168 static Factory* factory_; |
| 166 | 169 |
| 167 base::LeakTracker<URLFetcher> leak_tracker_; | 170 base::LeakTracker<URLFetcher> leak_tracker_; |
| 168 | 171 |
| 169 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); | 172 DISALLOW_EVIL_CONSTRUCTORS(URLFetcher); |
| 170 }; | 173 }; |
| 171 | 174 |
| 172 #endif // CHROME_BROWSER_URL_FETCHER_H_ | 175 #endif // CHROME_BROWSER_URL_FETCHER_H_ |
| OLD | NEW |