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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 IsIncludedInPromoFieldTrial()) | 653 IsIncludedInPromoFieldTrial()) |
654 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; | 654 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kPromoAllowed; |
655 if (data_reduction_proxy::DataReductionProxyParams:: | 655 if (data_reduction_proxy::DataReductionProxyParams:: |
656 IsIncludedInHoldbackFieldTrial()) | 656 IsIncludedInHoldbackFieldTrial()) |
657 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; | 657 drp_flags |= data_reduction_proxy::DataReductionProxyParams::kHoldback; |
658 globals_->data_reduction_proxy_params.reset( | 658 globals_->data_reduction_proxy_params.reset( |
659 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); | 659 new data_reduction_proxy::DataReductionProxyParams(drp_flags)); |
660 globals_->data_reduction_proxy_auth_request_handler.reset( | 660 globals_->data_reduction_proxy_auth_request_handler.reset( |
661 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( | 661 new data_reduction_proxy::DataReductionProxyAuthRequestHandler( |
662 DataReductionProxyChromeSettings::GetClient(), | 662 DataReductionProxyChromeSettings::GetClient(), |
663 DataReductionProxyChromeSettings::GetBuildAndPatchNumber(), | 663 DataReductionProxyChromeSettings::GetBuildNumber(), |
| 664 DataReductionProxyChromeSettings::GetPatchNumber(), |
664 globals_->data_reduction_proxy_params.get(), | 665 globals_->data_reduction_proxy_params.get(), |
665 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 666 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
666 // This is the same as in ProfileImplIOData except that we do not collect | 667 // This is the same as in ProfileImplIOData except that we do not collect |
667 // usage stats. | 668 // usage stats. |
668 network_delegate->set_data_reduction_proxy_params( | 669 network_delegate->set_data_reduction_proxy_params( |
669 globals_->data_reduction_proxy_params.get()); | 670 globals_->data_reduction_proxy_params.get()); |
670 network_delegate->set_data_reduction_proxy_auth_request_handler( | 671 network_delegate->set_data_reduction_proxy_auth_request_handler( |
671 globals_->data_reduction_proxy_auth_request_handler.get()); | 672 globals_->data_reduction_proxy_auth_request_handler.get()); |
672 network_delegate->set_on_resolve_proxy_handler( | 673 network_delegate->set_on_resolve_proxy_handler( |
673 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); | 674 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); | 1406 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); |
1406 for (size_t i = 0; i < supported_versions.size(); ++i) { | 1407 for (size_t i = 0; i < supported_versions.size(); ++i) { |
1407 net::QuicVersion version = supported_versions[i]; | 1408 net::QuicVersion version = supported_versions[i]; |
1408 if (net::QuicVersionToString(version) == quic_version) { | 1409 if (net::QuicVersionToString(version) == quic_version) { |
1409 return version; | 1410 return version; |
1410 } | 1411 } |
1411 } | 1412 } |
1412 | 1413 |
1413 return net::QUIC_VERSION_UNSUPPORTED; | 1414 return net::QUIC_VERSION_UNSUPPORTED; |
1414 } | 1415 } |
OLD | NEW |