Chromium Code Reviews| 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/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 #if defined(ENABLE_EXTENSIONS) | 100 #if defined(ENABLE_EXTENSIONS) |
| 101 #include "chrome/browser/extensions/event_router_forwarder.h" | 101 #include "chrome/browser/extensions/event_router_forwarder.h" |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 #if defined(USE_NSS) || defined(OS_IOS) | 104 #if defined(USE_NSS) || defined(OS_IOS) |
| 105 #include "net/ocsp/nss_ocsp.h" | 105 #include "net/ocsp/nss_ocsp.h" |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 #if defined(OS_ANDROID) | |
| 109 #include "base/android/build_info.h" | |
| 110 #endif | |
| 111 | |
| 108 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
| 109 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" | 113 #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" |
| 110 #include "chromeos/network/host_resolver_impl_chromeos.h" | 114 #include "chromeos/network/host_resolver_impl_chromeos.h" |
| 111 #endif | 115 #endif |
| 112 | 116 |
| 113 using content::BrowserThread; | 117 using content::BrowserThread; |
| 114 | 118 |
| 115 class SafeBrowsingURLRequestContext; | 119 class SafeBrowsingURLRequestContext; |
| 116 | 120 |
| 117 // The IOThread object must outlive any tasks posted to the IO thread before the | 121 // The IOThread object must outlive any tasks posted to the IO thread before the |
| (...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1164 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed | | 1168 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed | |
| 1165 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed; | 1169 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed; |
| 1166 if (data_reduction_proxy::DataReductionProxyParams:: | 1170 if (data_reduction_proxy::DataReductionProxyParams:: |
| 1167 IsIncludedInPromoFieldTrial()) { | 1171 IsIncludedInPromoFieldTrial()) { |
| 1168 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; | 1172 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; |
| 1169 } | 1173 } |
| 1170 if (data_reduction_proxy::DataReductionProxyParams:: | 1174 if (data_reduction_proxy::DataReductionProxyParams:: |
| 1171 IsIncludedInHoldbackFieldTrial()) { | 1175 IsIncludedInHoldbackFieldTrial()) { |
| 1172 flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 1176 flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
| 1173 } | 1177 } |
| 1178 #if defined(OS_ANDROID) | |
| 1179 if (data_reduction_proxy::DataReductionProxyParams:: | |
| 1180 IsIncludedInAndroidOnePromoFieldTrial( | |
| 1181 base::android::BuildInfo::GetInstance()->android_build_fp())) { | |
| 1182 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; | |
|
mmenke
2014/12/17 16:32:50
We already have data_reduction_proxy::DataReductio
jeremyim
2014/12/17 17:52:49
This will get cleaned up/refactored in bengr's CL
| |
| 1183 } | |
| 1184 #endif | |
| 1174 globals_->data_reduction_proxy_params.reset( | 1185 globals_->data_reduction_proxy_params.reset( |
| 1175 new data_reduction_proxy::DataReductionProxyParams(flags)); | 1186 new data_reduction_proxy::DataReductionProxyParams(flags)); |
| 1176 globals_->data_reduction_proxy_auth_request_handler.reset( | 1187 globals_->data_reduction_proxy_auth_request_handler.reset( |
| 1177 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( | 1188 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
| 1178 DataReductionProxyChromeSettings::GetClient(), | 1189 DataReductionProxyChromeSettings::GetClient(), |
| 1179 globals_->data_reduction_proxy_params.get(), | 1190 globals_->data_reduction_proxy_params.get(), |
| 1180 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 1191 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
| 1181 globals_->data_reduction_proxy_delegate.reset( | 1192 globals_->data_reduction_proxy_delegate.reset( |
| 1182 new data_reduction_proxy::DataReductionProxyDelegate( | 1193 new data_reduction_proxy::DataReductionProxyDelegate( |
| 1183 globals_->data_reduction_proxy_auth_request_handler.get(), | 1194 globals_->data_reduction_proxy_auth_request_handler.get(), |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1407 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1418 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
| 1408 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1419 for (size_t i = 0; i < supported_versions.size(); ++i) { |
| 1409 net::QuicVersion version = supported_versions[i]; | 1420 net::QuicVersion version = supported_versions[i]; |
| 1410 if (net::QuicVersionToString(version) == quic_version) { | 1421 if (net::QuicVersionToString(version) == quic_version) { |
| 1411 return version; | 1422 return version; |
| 1412 } | 1423 } |
| 1413 } | 1424 } |
| 1414 | 1425 |
| 1415 return net::QUIC_VERSION_UNSUPPORTED; | 1426 return net::QUIC_VERSION_UNSUPPORTED; |
| 1416 } | 1427 } |
| OLD | NEW |