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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed | | 1180 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed | |
1177 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed; | 1181 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed; |
1178 if (data_reduction_proxy::DataReductionProxyParams:: | 1182 if (data_reduction_proxy::DataReductionProxyParams:: |
1179 IsIncludedInPromoFieldTrial()) { | 1183 IsIncludedInPromoFieldTrial()) { |
1180 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; | 1184 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; |
1181 } | 1185 } |
1182 if (data_reduction_proxy::DataReductionProxyParams:: | 1186 if (data_reduction_proxy::DataReductionProxyParams:: |
1183 IsIncludedInHoldbackFieldTrial()) { | 1187 IsIncludedInHoldbackFieldTrial()) { |
1184 flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 1188 flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
1185 } | 1189 } |
| 1190 #if defined(OS_ANDROID) |
| 1191 if (data_reduction_proxy::DataReductionProxyParams:: |
| 1192 IsIncludedInAndroidOnePromoFieldTrial( |
| 1193 base::android::BuildInfo::GetInstance()->android_build_fp())) { |
| 1194 flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; |
| 1195 } |
| 1196 #endif |
1186 globals_->data_reduction_proxy_params.reset( | 1197 globals_->data_reduction_proxy_params.reset( |
1187 new data_reduction_proxy::DataReductionProxyParams(flags)); | 1198 new data_reduction_proxy::DataReductionProxyParams(flags)); |
1188 globals_->data_reduction_proxy_auth_request_handler.reset( | 1199 globals_->data_reduction_proxy_auth_request_handler.reset( |
1189 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( | 1200 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
1190 DataReductionProxyChromeSettings::GetClient(), | 1201 DataReductionProxyChromeSettings::GetClient(), |
1191 globals_->data_reduction_proxy_params.get(), | 1202 globals_->data_reduction_proxy_params.get(), |
1192 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 1203 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
1193 globals_->data_reduction_proxy_delegate.reset( | 1204 globals_->data_reduction_proxy_delegate.reset( |
1194 new data_reduction_proxy::DataReductionProxyDelegate( | 1205 new data_reduction_proxy::DataReductionProxyDelegate( |
1195 globals_->data_reduction_proxy_auth_request_handler.get(), | 1206 globals_->data_reduction_proxy_auth_request_handler.get(), |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1441 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1431 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1442 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1432 net::QuicVersion version = supported_versions[i]; | 1443 net::QuicVersion version = supported_versions[i]; |
1433 if (net::QuicVersionToString(version) == quic_version) { | 1444 if (net::QuicVersionToString(version) == quic_version) { |
1434 return version; | 1445 return version; |
1435 } | 1446 } |
1436 } | 1447 } |
1437 | 1448 |
1438 return net::QUIC_VERSION_UNSUPPORTED; | 1449 return net::QUIC_VERSION_UNSUPPORTED; |
1439 } | 1450 } |
OLD | NEW |