| 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/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 ignore_certificate_errors(false), | 350 ignore_certificate_errors(false), |
| 351 http_pipelining_enabled(false), | 351 http_pipelining_enabled(false), |
| 352 testing_fixed_http_port(0), | 352 testing_fixed_http_port(0), |
| 353 testing_fixed_https_port(0) {} | 353 testing_fixed_https_port(0) {} |
| 354 | 354 |
| 355 IOThread::Globals::~Globals() {} | 355 IOThread::Globals::~Globals() {} |
| 356 | 356 |
| 357 // |local_state| is passed in explicitly in order to (1) reduce implicit | 357 // |local_state| is passed in explicitly in order to (1) reduce implicit |
| 358 // dependencies and (2) make IOThread more flexible for testing. | 358 // dependencies and (2) make IOThread more flexible for testing. |
| 359 IOThread::IOThread( | 359 IOThread::IOThread( |
| 360 PrefService* local_state, | 360 PrefServiceSimple* local_state, |
| 361 policy::PolicyService* policy_service, | 361 policy::PolicyService* policy_service, |
| 362 ChromeNetLog* net_log, | 362 ChromeNetLog* net_log, |
| 363 extensions::EventRouterForwarder* extension_event_router_forwarder) | 363 extensions::EventRouterForwarder* extension_event_router_forwarder) |
| 364 : net_log_(net_log), | 364 : net_log_(net_log), |
| 365 extension_event_router_forwarder_(extension_event_router_forwarder), | 365 extension_event_router_forwarder_(extension_event_router_forwarder), |
| 366 globals_(NULL), | 366 globals_(NULL), |
| 367 sdch_manager_(NULL), | 367 sdch_manager_(NULL), |
| 368 is_spdy_disabled_by_policy_(false), | 368 is_spdy_disabled_by_policy_(false), |
| 369 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 369 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
| 370 // We call RegisterPrefs() here (instead of inside browser_prefs.cc) to make | 370 // We call RegisterPrefs() here (instead of inside browser_prefs.cc) to make |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 globals_->initial_max_spdy_concurrent_streams.set(streams); | 711 globals_->initial_max_spdy_concurrent_streams.set(streams); |
| 712 } else if (option.empty() && it == spdy_options.begin()) { | 712 } else if (option.empty() && it == spdy_options.begin()) { |
| 713 continue; | 713 continue; |
| 714 } else { | 714 } else { |
| 715 LOG(DFATAL) << "Unrecognized spdy option: " << option; | 715 LOG(DFATAL) << "Unrecognized spdy option: " << option; |
| 716 } | 716 } |
| 717 } | 717 } |
| 718 } | 718 } |
| 719 | 719 |
| 720 // static | 720 // static |
| 721 void IOThread::RegisterPrefs(PrefService* local_state) { | 721 void IOThread::RegisterPrefs(PrefServiceSimple* local_state) { |
| 722 local_state->RegisterStringPref(prefs::kAuthSchemes, | 722 local_state->RegisterStringPref(prefs::kAuthSchemes, |
| 723 "basic,digest,ntlm,negotiate," | 723 "basic,digest,ntlm,negotiate," |
| 724 "spdyproxy"); | 724 "spdyproxy"); |
| 725 local_state->RegisterBooleanPref(prefs::kDisableAuthNegotiateCnameLookup, | 725 local_state->RegisterBooleanPref(prefs::kDisableAuthNegotiateCnameLookup, |
| 726 false); | 726 false); |
| 727 local_state->RegisterBooleanPref(prefs::kEnableAuthNegotiatePort, false); | 727 local_state->RegisterBooleanPref(prefs::kEnableAuthNegotiatePort, false); |
| 728 local_state->RegisterStringPref(prefs::kAuthServerWhitelist, ""); | 728 local_state->RegisterStringPref(prefs::kAuthServerWhitelist, ""); |
| 729 local_state->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, ""); | 729 local_state->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist, ""); |
| 730 local_state->RegisterStringPref(prefs::kGSSAPILibraryName, ""); | 730 local_state->RegisterStringPref(prefs::kGSSAPILibraryName, ""); |
| 731 local_state->RegisterStringPref(prefs::kSpdyProxyOrigin, ""); | 731 local_state->RegisterStringPref(prefs::kSpdyProxyOrigin, ""); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 globals_->system_request_context.reset( | 887 globals_->system_request_context.reset( |
| 888 ConstructSystemRequestContext(globals_, net_log_)); | 888 ConstructSystemRequestContext(globals_, net_log_)); |
| 889 | 889 |
| 890 sdch_manager_->set_sdch_fetcher( | 890 sdch_manager_->set_sdch_fetcher( |
| 891 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 891 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
| 892 } | 892 } |
| 893 | 893 |
| 894 void IOThread::UpdateDnsClientEnabled() { | 894 void IOThread::UpdateDnsClientEnabled() { |
| 895 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); | 895 globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_); |
| 896 } | 896 } |
| OLD | NEW |