OLD | NEW |
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 #include "chrome/browser/profiles/profile_io_data.h" | 5 #include "chrome/browser/profiles/profile_io_data.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 IOThread* const io_thread = profile_params_->io_thread; | 982 IOThread* const io_thread = profile_params_->io_thread; |
983 IOThread::Globals* const io_thread_globals = io_thread->globals(); | 983 IOThread::Globals* const io_thread_globals = io_thread->globals(); |
984 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 984 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
985 | 985 |
986 // Create the common request contexts. | 986 // Create the common request contexts. |
987 main_request_context_.reset(new ChromeURLRequestContext()); | 987 main_request_context_.reset(new ChromeURLRequestContext()); |
988 extensions_request_context_.reset(new ChromeURLRequestContext()); | 988 extensions_request_context_.reset(new ChromeURLRequestContext()); |
989 | 989 |
990 ChromeNetworkDelegate* network_delegate = | 990 ChromeNetworkDelegate* network_delegate = |
991 new ChromeNetworkDelegate( | 991 new ChromeNetworkDelegate( |
| 992 #if defined(ENABLE_EXTENSIONS) |
992 io_thread_globals->extension_event_router_forwarder.get(), | 993 io_thread_globals->extension_event_router_forwarder.get(), |
| 994 #else |
| 995 NULL, |
| 996 #endif |
993 &enable_referrers_); | 997 &enable_referrers_); |
994 network_delegate->set_data_reduction_proxy_params( | 998 network_delegate->set_data_reduction_proxy_params( |
995 io_thread_globals->data_reduction_proxy_params.get()); | 999 io_thread_globals->data_reduction_proxy_params.get()); |
996 network_delegate->set_data_reduction_proxy_usage_stats( | 1000 network_delegate->set_data_reduction_proxy_usage_stats( |
997 io_thread_globals->data_reduction_proxy_usage_stats.get()); | 1001 io_thread_globals->data_reduction_proxy_usage_stats.get()); |
998 network_delegate->set_data_reduction_proxy_auth_request_handler( | 1002 network_delegate->set_data_reduction_proxy_auth_request_handler( |
999 io_thread_globals->data_reduction_proxy_auth_request_handler.get()); | 1003 io_thread_globals->data_reduction_proxy_auth_request_handler.get()); |
1000 network_delegate->set_on_resolve_proxy_handler( | 1004 network_delegate->set_on_resolve_proxy_handler( |
1001 io_thread_globals->on_resolve_proxy_handler); | 1005 io_thread_globals->on_resolve_proxy_handler); |
1002 if (command_line.HasSwitch(switches::kEnableClientHints)) | 1006 if (command_line.HasSwitch(switches::kEnableClientHints)) |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 void ProfileIOData::SetCookieSettingsForTesting( | 1254 void ProfileIOData::SetCookieSettingsForTesting( |
1251 CookieSettings* cookie_settings) { | 1255 CookieSettings* cookie_settings) { |
1252 DCHECK(!cookie_settings_.get()); | 1256 DCHECK(!cookie_settings_.get()); |
1253 cookie_settings_ = cookie_settings; | 1257 cookie_settings_ = cookie_settings; |
1254 } | 1258 } |
1255 | 1259 |
1256 void ProfileIOData::set_signin_names_for_testing( | 1260 void ProfileIOData::set_signin_names_for_testing( |
1257 SigninNamesOnIOThread* signin_names) { | 1261 SigninNamesOnIOThread* signin_names) { |
1258 signin_names_.reset(signin_names); | 1262 signin_names_.reset(signin_names); |
1259 } | 1263 } |
OLD | NEW |