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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 822cecc8768e0099c5255de9070f6521750c8cd9..789b781881e15d2948e13b2378b791ee0fff52ef 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -108,10 +108,16 @@ void TestURLRequestContext::Init() {
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
}
- if (accept_language().empty())
- set_accept_language("en-us,fr");
- if (accept_charset().empty())
- set_accept_charset("iso-8859-1,*,utf-8");
+ if (accept_language().empty()) {
erikwright (departed) 2012/09/21 15:06:33 It might be more correct to provide a method: Tes
pauljensen 2012/09/24 20:21:15 Why would this be more correct?
+ context_storage_.set_http_user_agent_settings(
+ new net::ConstHttpUserAgentSettings(
+ "en-us,fr", accept_charset(), EmptyString()));
+ }
+ if (accept_charset().empty()) {
+ context_storage_.set_http_user_agent_settings(
+ new net::ConstHttpUserAgentSettings(
+ accept_language(), "iso-8859-1,*,utf-8", EmptyString()));
+ }
if (!job_factory())
context_storage_.set_job_factory(new net::URLRequestJobFactoryImpl);
}

Powered by Google App Engine
This is Rietveld 408576698