Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: chrome/browser/io_thread.cc

Issue 430643002: Correcting the version field in the Chrome-Proxy header to be the chromium build and patch number. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trybot test fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 #include "base/time/time.h" 27 #include "base/time/time.h"
28 #include "build/build_config.h" 28 #include "build/build_config.h"
29 #include "chrome/browser/browser_process.h" 29 #include "chrome/browser/browser_process.h"
30 #include "chrome/browser/net/async_dns_field_trial.h" 30 #include "chrome/browser/net/async_dns_field_trial.h"
31 #include "chrome/browser/net/chrome_net_log.h" 31 #include "chrome/browser/net/chrome_net_log.h"
32 #include "chrome/browser/net/chrome_network_delegate.h" 32 #include "chrome/browser/net/chrome_network_delegate.h"
33 #include "chrome/browser/net/connect_interceptor.h" 33 #include "chrome/browser/net/connect_interceptor.h"
34 #include "chrome/browser/net/dns_probe_service.h" 34 #include "chrome/browser/net/dns_probe_service.h"
35 #include "chrome/browser/net/pref_proxy_config_tracker.h" 35 #include "chrome/browser/net/pref_proxy_config_tracker.h"
36 #include "chrome/browser/net/proxy_service_factory.h" 36 #include "chrome/browser/net/proxy_service_factory.h"
37 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
37 #include "chrome/common/chrome_content_client.h" 38 #include "chrome/common/chrome_content_client.h"
38 #include "chrome/common/chrome_switches.h" 39 #include "chrome/common/chrome_switches.h"
39 #include "chrome/common/chrome_version_info.h" 40 #include "chrome/common/chrome_version_info.h"
40 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
41 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h" 42 #include "components/data_reduction_proxy/browser/data_reduction_proxy_prefs.h"
42 #include "components/policy/core/common/policy_service.h" 43 #include "components/policy/core/common/policy_service.h"
43 #include "components/variations/variations_associated_data.h" 44 #include "components/variations/variations_associated_data.h"
44 #include "content/public/browser/browser_thread.h" 45 #include "content/public/browser/browser_thread.h"
45 #include "content/public/browser/cookie_store_factory.h" 46 #include "content/public/browser/cookie_store_factory.h"
46 #include "net/base/host_mapping_rules.h" 47 #include "net/base/host_mapping_rules.h"
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 if (DataReductionProxyParams::IsIncludedInFieldTrial()) 648 if (DataReductionProxyParams::IsIncludedInFieldTrial())
648 drp_flags |= DataReductionProxyParams::kAllowed; 649 drp_flags |= DataReductionProxyParams::kAllowed;
649 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial()) 650 if (DataReductionProxyParams::IsIncludedInAlternativeFieldTrial())
650 drp_flags |= DataReductionProxyParams::kAlternativeAllowed; 651 drp_flags |= DataReductionProxyParams::kAlternativeAllowed;
651 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial()) 652 if (DataReductionProxyParams::IsIncludedInPromoFieldTrial())
652 drp_flags |= DataReductionProxyParams::kPromoAllowed; 653 drp_flags |= DataReductionProxyParams::kPromoAllowed;
653 DataReductionProxyParams* proxy_params = 654 DataReductionProxyParams* proxy_params =
654 new DataReductionProxyParams(drp_flags); 655 new DataReductionProxyParams(drp_flags);
655 globals_->data_reduction_proxy_params.reset(proxy_params); 656 globals_->data_reduction_proxy_params.reset(proxy_params);
656 globals_->data_reduction_proxy_auth_request_handler.reset( 657 globals_->data_reduction_proxy_auth_request_handler.reset(
657 new DataReductionProxyAuthRequestHandler(proxy_params)); 658 new DataReductionProxyAuthRequestHandler(
659 DataReductionProxyChromeSettings::GetClient(),
660 DataReductionProxyChromeSettings::GetBuildAndPatchNumber(),
661 proxy_params));
658 globals_->on_resolve_proxy_handler = 662 globals_->on_resolve_proxy_handler =
659 ChromeNetworkDelegate::OnResolveProxyHandler( 663 ChromeNetworkDelegate::OnResolveProxyHandler(
660 base::Bind(data_reduction_proxy::OnResolveProxyHandler)); 664 base::Bind(data_reduction_proxy::OnResolveProxyHandler));
661 DataReductionProxyUsageStats* proxy_usage_stats = 665 DataReductionProxyUsageStats* proxy_usage_stats =
662 new DataReductionProxyUsageStats(proxy_params, 666 new DataReductionProxyUsageStats(proxy_params,
663 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 667 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
664 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 668 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
665 network_delegate->set_data_reduction_proxy_params(proxy_params); 669 network_delegate->set_data_reduction_proxy_params(proxy_params);
666 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats); 670 globals_->data_reduction_proxy_usage_stats.reset(proxy_usage_stats);
667 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats); 671 network_delegate->set_data_reduction_proxy_usage_stats(proxy_usage_stats);
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1391 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1388 for (size_t i = 0; i < supported_versions.size(); ++i) { 1392 for (size_t i = 0; i < supported_versions.size(); ++i) {
1389 net::QuicVersion version = supported_versions[i]; 1393 net::QuicVersion version = supported_versions[i];
1390 if (net::QuicVersionToString(version) == quic_version) { 1394 if (net::QuicVersionToString(version) == quic_version) {
1391 return version; 1395 return version;
1392 } 1396 }
1393 } 1397 }
1394 1398
1395 return net::QUIC_VERSION_UNSUPPORTED; 1399 return net::QUIC_VERSION_UNSUPPORTED;
1396 } 1400 }
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents_statics.cc ('k') | chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698