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

Unified Diff: chrome/browser/net/chrome_url_request_context.cc

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespaces in mac files Created 9 years, 11 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: chrome/browser/net/chrome_url_request_context.cc
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index e742430f3154e0f4adeac09d19341a8654114373..e09802f02877346c4f2d45ddaf2049d41f28c8e9 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -380,6 +380,7 @@ class FactoryForOffTheRecord : public ChromeURLRequestContextFactory {
public:
explicit FactoryForOffTheRecord(Profile* profile)
: ChromeURLRequestContextFactory(profile),
+ proxy_config_service_(CreateProxyConfigService(profile)),
original_context_getter_(
static_cast<ChromeURLRequestContextGetter*>(
profile->GetOriginalProfile()->GetRequestContext())) {
@@ -388,6 +389,7 @@ class FactoryForOffTheRecord : public ChromeURLRequestContextFactory {
virtual ChromeURLRequestContext* Create();
private:
+ scoped_ptr<net::ProxyConfigService> proxy_config_service_;
scoped_refptr<ChromeURLRequestContextGetter> original_context_getter_;
};
@@ -404,7 +406,12 @@ ChromeURLRequestContext* FactoryForOffTheRecord::Create() {
// and http_auth_handler_factory as the original profile.
context->set_host_resolver(original_context->host_resolver());
context->set_cert_verifier(original_context->cert_verifier());
- context->set_proxy_service(original_context->proxy_service());
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ context->set_proxy_service(
+ CreateProxyService(io_thread()->net_log(),
+ io_thread_globals->proxy_script_fetcher_context.get(),
+ proxy_config_service_.release(),
+ command_line));
context->set_http_auth_handler_factory(
original_context->http_auth_handler_factory());

Powered by Google App Engine
This is Rietveld 408576698