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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/mac/keystone_glue.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 #include "base/trace_event/trace_event.h" 29 #include "base/trace_event/trace_event.h"
30 #include "build/build_config.h" 30 #include "build/build_config.h"
31 #include "chrome/browser/browser_process.h" 31 #include "chrome/browser/browser_process.h"
32 #include "chrome/browser/net/async_dns_field_trial.h" 32 #include "chrome/browser/net/async_dns_field_trial.h"
33 #include "chrome/browser/net/chrome_net_log.h" 33 #include "chrome/browser/net/chrome_net_log.h"
34 #include "chrome/browser/net/chrome_network_delegate.h" 34 #include "chrome/browser/net/chrome_network_delegate.h"
35 #include "chrome/browser/net/connect_interceptor.h" 35 #include "chrome/browser/net/connect_interceptor.h"
36 #include "chrome/browser/net/dns_probe_service.h" 36 #include "chrome/browser/net/dns_probe_service.h"
37 #include "chrome/browser/net/pref_proxy_config_tracker.h" 37 #include "chrome/browser/net/pref_proxy_config_tracker.h"
38 #include "chrome/browser/net/proxy_service_factory.h" 38 #include "chrome/browser/net/proxy_service_factory.h"
39 #include "chrome/common/channel_info.h"
39 #include "chrome/common/chrome_content_client.h" 40 #include "chrome/common/chrome_content_client.h"
40 #include "chrome/common/chrome_switches.h" 41 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/chrome_version_info.h"
42 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
43 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h" 43 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref s.h"
44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
45 #include "components/policy/core/common/policy_service.h" 45 #include "components/policy/core/common/policy_service.h"
46 #include "components/variations/variations_associated_data.h" 46 #include "components/variations/variations_associated_data.h"
47 #include "components/version_info/version_info.h"
47 #include "content/public/browser/browser_thread.h" 48 #include "content/public/browser/browser_thread.h"
48 #include "content/public/browser/cookie_store_factory.h" 49 #include "content/public/browser/cookie_store_factory.h"
49 #include "content/public/common/user_agent.h" 50 #include "content/public/common/user_agent.h"
50 #include "net/base/host_mapping_rules.h" 51 #include "net/base/host_mapping_rules.h"
51 #include "net/base/net_util.h" 52 #include "net/base/net_util.h"
52 #include "net/base/network_quality_estimator.h" 53 #include "net/base/network_quality_estimator.h"
53 #include "net/base/sdch_manager.h" 54 #include "net/base/sdch_manager.h"
54 #include "net/cert/cert_policy_enforcer.h" 55 #include "net/cert/cert_policy_enforcer.h"
55 #include "net/cert/cert_verifier.h" 56 #include "net/cert/cert_verifier.h"
56 #include "net/cert/cert_verify_proc.h" 57 #include "net/cert/cert_verify_proc.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 job_factory->SetProtocolHandler( 860 job_factory->SetProtocolHandler(
860 url::kFtpScheme, 861 url::kFtpScheme,
861 new net::FtpProtocolHandler( 862 new net::FtpProtocolHandler(
862 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); 863 globals_->proxy_script_fetcher_ftp_transaction_factory.get()));
863 #endif 864 #endif
864 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); 865 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass();
865 866
866 globals_->proxy_script_fetcher_context.reset( 867 globals_->proxy_script_fetcher_context.reset(
867 ConstructProxyScriptFetcherContext(globals_, net_log_)); 868 ConstructProxyScriptFetcherContext(globals_, net_log_));
868 869
869 const version_info::Channel channel = chrome::VersionInfo::GetChannel(); 870 const version_info::Channel channel = chrome::GetChannel();
870 if (channel == version_info::Channel::UNKNOWN || 871 if (channel == version_info::Channel::UNKNOWN ||
871 channel == version_info::Channel::CANARY || 872 channel == version_info::Channel::CANARY ||
872 channel == version_info::Channel::DEV) { 873 channel == version_info::Channel::DEV) {
873 globals_->url_request_backoff_manager.reset( 874 globals_->url_request_backoff_manager.reset(
874 new net::URLRequestBackoffManager()); 875 new net::URLRequestBackoffManager());
875 } 876 }
876 877
877 #if defined(OS_MACOSX) && !defined(OS_IOS) 878 #if defined(OS_MACOSX) && !defined(OS_IOS)
878 // Start observing Keychain events. This needs to be done on the UI thread, 879 // Start observing Keychain events. This needs to be done on the UI thread,
879 // as Keychain services requires a CFRunLoop. 880 // as Keychain services requires a CFRunLoop.
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 globals->quic_connection_options = 1310 globals->quic_connection_options =
1310 GetQuicConnectionOptions(command_line, quic_trial_params); 1311 GetQuicConnectionOptions(command_line, quic_trial_params);
1311 } 1312 }
1312 1313
1313 size_t max_packet_length = GetQuicMaxPacketLength(command_line, 1314 size_t max_packet_length = GetQuicMaxPacketLength(command_line,
1314 quic_trial_params); 1315 quic_trial_params);
1315 if (max_packet_length != 0) { 1316 if (max_packet_length != 0) {
1316 globals->quic_max_packet_length.set(max_packet_length); 1317 globals->quic_max_packet_length.set(max_packet_length);
1317 } 1318 }
1318 1319
1319 std::string quic_user_agent_id = 1320 std::string quic_user_agent_id = chrome::GetChannelString();
1320 chrome::VersionInfo::GetVersionStringModifier();
1321 if (!quic_user_agent_id.empty()) 1321 if (!quic_user_agent_id.empty())
1322 quic_user_agent_id.push_back(' '); 1322 quic_user_agent_id.push_back(' ');
1323 chrome::VersionInfo version_info; 1323 quic_user_agent_id.append(
1324 quic_user_agent_id.append(version_info.ProductNameAndVersionForUserAgent()); 1324 version_info::GetProductNameAndVersionForUserAgent());
1325 quic_user_agent_id.push_back(' '); 1325 quic_user_agent_id.push_back(' ');
1326 quic_user_agent_id.append(content::BuildOSCpuInfo()); 1326 quic_user_agent_id.append(content::BuildOSCpuInfo());
1327 globals->quic_user_agent_id.set(quic_user_agent_id); 1327 globals->quic_user_agent_id.set(quic_user_agent_id);
1328 1328
1329 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params); 1329 net::QuicVersion version = GetQuicVersion(command_line, quic_trial_params);
1330 if (version != net::QUIC_VERSION_UNSUPPORTED) { 1330 if (version != net::QUIC_VERSION_UNSUPPORTED) {
1331 net::QuicVersionVector supported_versions; 1331 net::QuicVersionVector supported_versions;
1332 supported_versions.push_back(version); 1332 supported_versions.push_back(version);
1333 globals->quic_supported_versions.set(supported_versions); 1333 globals->quic_supported_versions.set(supported_versions);
1334 } 1334 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1593 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1594 for (size_t i = 0; i < supported_versions.size(); ++i) { 1594 for (size_t i = 0; i < supported_versions.size(); ++i) {
1595 net::QuicVersion version = supported_versions[i]; 1595 net::QuicVersion version = supported_versions[i];
1596 if (net::QuicVersionToString(version) == quic_version) { 1596 if (net::QuicVersionToString(version) == quic_version) {
1597 return version; 1597 return version;
1598 } 1598 }
1599 } 1599 }
1600 1600
1601 return net::QUIC_VERSION_UNSUPPORTED; 1601 return net::QUIC_VERSION_UNSUPPORTED;
1602 } 1602 }
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_client.cc ('k') | chrome/browser/mac/keystone_glue.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698