| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 #include "chrome/browser/android/data_usage/external_data_use_observer.h" | 123 #include "chrome/browser/android/data_usage/external_data_use_observer.h" |
| 124 #include "chrome/browser/android/net/external_estimate_provider_android.h" | 124 #include "chrome/browser/android/net/external_estimate_provider_android.h" |
| 125 #include "components/data_usage/android/traffic_stats_amortizer.h" | 125 #include "components/data_usage/android/traffic_stats_amortizer.h" |
| 126 #include "net/cert/cert_net_fetcher.h" | 126 #include "net/cert/cert_net_fetcher.h" |
| 127 #include "net/cert/cert_verify_proc_android.h" | 127 #include "net/cert/cert_verify_proc_android.h" |
| 128 #include "net/cert_net/cert_net_fetcher_impl.h" | 128 #include "net/cert_net/cert_net_fetcher_impl.h" |
| 129 #endif // defined(OS_ANDROID) | 129 #endif // defined(OS_ANDROID) |
| 130 | 130 |
| 131 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
| 132 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 132 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 133 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 133 #include "chromeos/network/host_resolver_impl_chromeos.h" | 134 #include "chromeos/network/host_resolver_impl_chromeos.h" |
| 134 #endif | 135 #endif |
| 135 | 136 |
| 136 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) | 137 #if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) |
| 137 #include "crypto/openssl_util.h" | 138 #include "crypto/openssl_util.h" |
| 138 #include "third_party/boringssl/src/include/openssl/cpu.h" | 139 #include "third_party/boringssl/src/include/openssl/cpu.h" |
| 139 #endif | 140 #endif |
| 140 | 141 |
| 141 using content::BrowserThread; | 142 using content::BrowserThread; |
| 142 | 143 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 #if defined(OS_ANDROID) | 383 #if defined(OS_ANDROID) |
| 383 auth_android_negotiate_account_type_.Init( | 384 auth_android_negotiate_account_type_.Init( |
| 384 prefs::kAuthAndroidNegotiateAccountType, local_state, | 385 prefs::kAuthAndroidNegotiateAccountType, local_state, |
| 385 base::Bind(&IOThread::UpdateAndroidAuthNegotiateAccountType, | 386 base::Bind(&IOThread::UpdateAndroidAuthNegotiateAccountType, |
| 386 base::Unretained(this))); | 387 base::Unretained(this))); |
| 387 auth_android_negotiate_account_type_.MoveToThread(io_thread_proxy); | 388 auth_android_negotiate_account_type_.MoveToThread(io_thread_proxy); |
| 388 #endif | 389 #endif |
| 389 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 390 #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| 390 gssapi_library_name_ = local_state->GetString(prefs::kGSSAPILibraryName); | 391 gssapi_library_name_ = local_state->GetString(prefs::kGSSAPILibraryName); |
| 391 #endif | 392 #endif |
| 393 #if defined(OS_CHROMEOS) |
| 394 policy::BrowserPolicyConnectorChromeOS* connector = |
| 395 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 396 allow_gssapi_library_load_ = connector->IsActiveDirectoryManaged(); |
| 397 #endif |
| 392 pref_proxy_config_tracker_.reset( | 398 pref_proxy_config_tracker_.reset( |
| 393 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( | 399 ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( |
| 394 local_state)); | 400 local_state)); |
| 395 ChromeNetworkDelegate::InitializePrefsOnUIThread( | 401 ChromeNetworkDelegate::InitializePrefsOnUIThread( |
| 396 &system_enable_referrers_, | 402 &system_enable_referrers_, |
| 397 nullptr, | 403 nullptr, |
| 398 nullptr, | 404 nullptr, |
| 399 nullptr, | 405 nullptr, |
| 400 nullptr, | 406 nullptr, |
| 401 local_state); | 407 local_state); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 | 779 |
| 774 void IOThread::CreateDefaultAuthHandlerFactory() { | 780 void IOThread::CreateDefaultAuthHandlerFactory() { |
| 775 std::vector<std::string> supported_schemes = base::SplitString( | 781 std::vector<std::string> supported_schemes = base::SplitString( |
| 776 auth_schemes_, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); | 782 auth_schemes_, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); |
| 777 globals_->http_auth_preferences.reset(new net::HttpAuthPreferences( | 783 globals_->http_auth_preferences.reset(new net::HttpAuthPreferences( |
| 778 supported_schemes | 784 supported_schemes |
| 779 #if defined(OS_POSIX) && !defined(OS_ANDROID) | 785 #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| 780 , | 786 , |
| 781 gssapi_library_name_ | 787 gssapi_library_name_ |
| 782 #endif | 788 #endif |
| 789 #if defined(OS_CHROMEOS) |
| 790 , |
| 791 allow_gssapi_library_load_ |
| 792 #endif |
| 783 )); | 793 )); |
| 784 UpdateServerWhitelist(); | 794 UpdateServerWhitelist(); |
| 785 UpdateDelegateWhitelist(); | 795 UpdateDelegateWhitelist(); |
| 786 UpdateNegotiateDisableCnameLookup(); | 796 UpdateNegotiateDisableCnameLookup(); |
| 787 UpdateNegotiateEnablePort(); | 797 UpdateNegotiateEnablePort(); |
| 788 #if defined(OS_ANDROID) | 798 #if defined(OS_ANDROID) |
| 789 UpdateAndroidAuthNegotiateAccountType(); | 799 UpdateAndroidAuthNegotiateAccountType(); |
| 790 #endif | 800 #endif |
| 791 globals_->http_auth_handler_factory = | 801 globals_->http_auth_handler_factory = |
| 792 net::HttpAuthHandlerRegistryFactory::Create( | 802 net::HttpAuthHandlerRegistryFactory::Create( |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 | 1112 |
| 1103 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the | 1113 // TODO(rtenneti): We should probably use HttpServerPropertiesManager for the |
| 1104 // system URLRequestContext too. There's no reason this should be tied to a | 1114 // system URLRequestContext too. There's no reason this should be tied to a |
| 1105 // profile. | 1115 // profile. |
| 1106 return context; | 1116 return context; |
| 1107 } | 1117 } |
| 1108 | 1118 |
| 1109 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { | 1119 metrics::UpdateUsagePrefCallbackType IOThread::GetMetricsDataUseForwarder() { |
| 1110 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); | 1120 return base::Bind(&UpdateMetricsUsagePrefsOnUIThread); |
| 1111 } | 1121 } |
| OLD | NEW |