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

Unified Diff: net/url_request/url_request_context_builder.h

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable test for chrome_frame_net_tests Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.h
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index 66c8e7a7ec7f959e7177faa2838ded0a7bef7c76..fd21f8a62fe3a587017b08b9a5f998da6a519552 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -72,8 +72,15 @@ class NET_EXPORT URLRequestContextBuilder {
void set_proxy_config_service(ProxyConfigService* proxy_config_service);
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
- // Call this function to specify a hard-coded User-Agent for all requests that
- // don't have a User-Agent already set.
+ // Call these functions to specify hard-coded Accept-Language,
+ // Accept-Charset, or User-Agent header values for all requests that don't
+ // have the headers already set.
+ void set_accept_language(const std::string& accept_language) {
+ accept_language_ = accept_language;
+ }
+ void set_accept_charset(const std::string& accept_charset) {
+ accept_charset_ = accept_charset;
+ }
void set_user_agent(const std::string& user_agent) {
user_agent_ = user_agent;
}
@@ -108,6 +115,8 @@ class NET_EXPORT URLRequestContextBuilder {
URLRequestContext* Build();
private:
+ std::string accept_language_;
+ std::string accept_charset_;
std::string user_agent_;
bool ftp_enabled_;
bool http_cache_enabled_;
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698