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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 } | 629 } |
630 | 630 |
631 globals_->ssl_config_service = GetSSLConfigService(); | 631 globals_->ssl_config_service = GetSSLConfigService(); |
632 | 632 |
633 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 633 #if defined(SPDY_PROXY_AUTH_ORIGIN) |
634 int drp_flags = 0; | 634 int drp_flags = 0; |
635 if (data_reduction_proxy::DataReductionProxyParams:: | 635 if (data_reduction_proxy::DataReductionProxyParams:: |
636 IsIncludedInFieldTrial()) { | 636 IsIncludedInFieldTrial()) { |
637 drp_flags |= | 637 drp_flags |= |
638 (data_reduction_proxy::DataReductionProxyParams::kAllowed | | 638 (data_reduction_proxy::DataReductionProxyParams::kAllowed | |
639 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed); | 639 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed | |
640 } | 640 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed); |
641 if (data_reduction_proxy::DataReductionProxyParams:: | |
642 IsIncludedInAlternativeFieldTrial()) { | |
643 drp_flags |= | |
644 data_reduction_proxy::DataReductionProxyParams::kAlternativeAllowed; | |
645 } | 641 } |
646 if (data_reduction_proxy::DataReductionProxyParams:: | 642 if (data_reduction_proxy::DataReductionProxyParams:: |
647 IsIncludedInPromoFieldTrial()) | 643 IsIncludedInPromoFieldTrial()) |
648 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; | 644 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; |
649 if (data_reduction_proxy::DataReductionProxyParams:: | 645 if (data_reduction_proxy::DataReductionProxyParams:: |
650 IsIncludedInHoldbackFieldTrial()) | 646 IsIncludedInHoldbackFieldTrial()) |
651 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 647 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
652 globals_->data_reduction_proxy_params.reset( | 648 globals_->data_reduction_proxy_params.reset( |
653 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); | 649 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); |
654 globals_->data_reduction_proxy_auth_request_handler.reset( | 650 globals_->data_reduction_proxy_auth_request_handler.reset( |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1427 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1432 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1428 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1433 net::QuicVersion version = supported_versions[i]; | 1429 net::QuicVersion version = supported_versions[i]; |
1434 if (net::QuicVersionToString(version) == quic_version) { | 1430 if (net::QuicVersionToString(version) == quic_version) { |
1435 return version; | 1431 return version; |
1436 } | 1432 } |
1437 } | 1433 } |
1438 | 1434 |
1439 return net::QUIC_VERSION_UNSUPPORTED; | 1435 return net::QUIC_VERSION_UNSUPPORTED; |
1440 } | 1436 } |
OLD | NEW |