Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: net/url_request/url_request_context.h

Issue 11092088: Cleanup referrer_charset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 class represents contextual information (cookies, cache, etc.) 5 // This class represents contextual information (cookies, cache, etc.)
6 // that's useful when processing resource requests. 6 // that's useful when processing resource requests.
7 // The class is reference-counted so that it can be cleaned up after any 7 // The class is reference-counted so that it can be cleaned up after any
8 // requests that are using it have been completed. 8 // requests that are using it have been completed.
9 9
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 const std::string& accept_language() const { return accept_language_; } 182 const std::string& accept_language() const { return accept_language_; }
183 void set_accept_language(const std::string& accept_language) { 183 void set_accept_language(const std::string& accept_language) {
184 accept_language_ = accept_language; 184 accept_language_ = accept_language;
185 } 185 }
186 186
187 // Gets the UA string to use for the given URL. Pass an invalid URL (such as 187 // Gets the UA string to use for the given URL. Pass an invalid URL (such as
188 // GURL()) to get the default UA string. Subclasses should override this 188 // GURL()) to get the default UA string. Subclasses should override this
189 // method to provide a UA string. 189 // method to provide a UA string.
190 virtual const std::string& GetUserAgent(const GURL& url) const; 190 virtual const std::string& GetUserAgent(const GURL& url) const;
191 191
192 // In general, referrer_charset is not known when URLRequestContext is
193 // constructed. So, we need a setter.
194 const std::string& referrer_charset() const { return referrer_charset_; }
195 void set_referrer_charset(const std::string& charset) {
196 referrer_charset_ = charset;
197 }
198
199 const URLRequestJobFactory* job_factory() const { return job_factory_; } 192 const URLRequestJobFactory* job_factory() const { return job_factory_; }
200 void set_job_factory(const URLRequestJobFactory* job_factory) { 193 void set_job_factory(const URLRequestJobFactory* job_factory) {
201 job_factory_ = job_factory; 194 job_factory_ = job_factory;
202 } 195 }
203 196
204 // May be NULL. 197 // May be NULL.
205 URLRequestThrottlerManager* throttler_manager() const { 198 URLRequestThrottlerManager* throttler_manager() const {
206 return throttler_manager_; 199 return throttler_manager_;
207 } 200 }
208 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { 201 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) {
(...skipping 29 matching lines...) Expand all
238 scoped_refptr<CookieStore> cookie_store_; 231 scoped_refptr<CookieStore> cookie_store_;
239 TransportSecurityState* transport_security_state_; 232 TransportSecurityState* transport_security_state_;
240 #if !defined(DISABLE_FTP_SUPPORT) 233 #if !defined(DISABLE_FTP_SUPPORT)
241 scoped_ptr<FtpAuthCache> ftp_auth_cache_; 234 scoped_ptr<FtpAuthCache> ftp_auth_cache_;
242 #endif 235 #endif
243 std::string accept_language_; 236 std::string accept_language_;
244 std::string accept_charset_; 237 std::string accept_charset_;
245 // The charset of the referrer where this request comes from. It's not 238 // The charset of the referrer where this request comes from. It's not
246 // used in communication with a server but is used to construct a suggested 239 // used in communication with a server but is used to construct a suggested
247 // filename for file download. 240 // filename for file download.
248 std::string referrer_charset_;
249 HttpTransactionFactory* http_transaction_factory_; 241 HttpTransactionFactory* http_transaction_factory_;
250 FtpTransactionFactory* ftp_transaction_factory_; 242 FtpTransactionFactory* ftp_transaction_factory_;
251 const URLRequestJobFactory* job_factory_; 243 const URLRequestJobFactory* job_factory_;
252 URLRequestThrottlerManager* throttler_manager_; 244 URLRequestThrottlerManager* throttler_manager_;
253 245
254 // --------------------------------------------------------------------------- 246 // ---------------------------------------------------------------------------
255 // Important: When adding any new members below, consider whether they need to 247 // Important: When adding any new members below, consider whether they need to
256 // be added to CopyFrom. 248 // be added to CopyFrom.
257 // --------------------------------------------------------------------------- 249 // ---------------------------------------------------------------------------
258 250
259 scoped_ptr<std::set<const URLRequest*> > url_requests_; 251 scoped_ptr<std::set<const URLRequest*> > url_requests_;
260 252
261 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 253 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
262 }; 254 };
263 255
264 } // namespace net 256 } // namespace net
265 257
266 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 258 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/shell/shell_download_manager_delegate.cc ('k') | net/url_request/url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698