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

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

Issue 1257633002: Componentize VersionInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert version_info::Channel to a "class enum" 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
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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 job_factory->SetProtocolHandler( 859 job_factory->SetProtocolHandler(
860 url::kFtpScheme, 860 url::kFtpScheme,
861 new net::FtpProtocolHandler( 861 new net::FtpProtocolHandler(
862 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); 862 globals_->proxy_script_fetcher_ftp_transaction_factory.get()));
863 #endif 863 #endif
864 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass(); 864 globals_->proxy_script_fetcher_url_request_job_factory = job_factory.Pass();
865 865
866 globals_->proxy_script_fetcher_context.reset( 866 globals_->proxy_script_fetcher_context.reset(
867 ConstructProxyScriptFetcherContext(globals_, net_log_)); 867 ConstructProxyScriptFetcherContext(globals_, net_log_));
868 868
869 const chrome::VersionInfo::Channel channel = 869 const version_info::Channel channel = chrome::VersionInfo::GetChannel();
870 chrome::VersionInfo::GetChannel(); 870 if (channel == version_info::Channel::UNKNOWN ||
871 871 channel == version_info::Channel::CANARY ||
872 if (channel == chrome::VersionInfo::CHANNEL_UNKNOWN || 872 channel == version_info::Channel::DEV) {
873 channel == chrome::VersionInfo::CHANNEL_CANARY ||
874 channel == chrome::VersionInfo::CHANNEL_DEV) {
875 globals_->url_request_backoff_manager.reset( 873 globals_->url_request_backoff_manager.reset(
876 new net::URLRequestBackoffManager()); 874 new net::URLRequestBackoffManager());
877 } 875 }
878 876
879 #if defined(OS_MACOSX) && !defined(OS_IOS) 877 #if defined(OS_MACOSX) && !defined(OS_IOS)
880 // Start observing Keychain events. This needs to be done on the UI thread, 878 // Start observing Keychain events. This needs to be done on the UI thread,
881 // as Keychain services requires a CFRunLoop. 879 // as Keychain services requires a CFRunLoop.
882 BrowserThread::PostTask(BrowserThread::UI, 880 BrowserThread::PostTask(BrowserThread::UI,
883 FROM_HERE, 881 FROM_HERE,
884 base::Bind(&ObserveKeychainEvents)); 882 base::Bind(&ObserveKeychainEvents));
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 net::QuicVersionVector supported_versions = net::QuicSupportedVersions(); 1593 net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
1596 for (size_t i = 0; i < supported_versions.size(); ++i) { 1594 for (size_t i = 0; i < supported_versions.size(); ++i) {
1597 net::QuicVersion version = supported_versions[i]; 1595 net::QuicVersion version = supported_versions[i];
1598 if (net::QuicVersionToString(version) == quic_version) { 1596 if (net::QuicVersionToString(version) == quic_version) {
1599 return version; 1597 return version;
1600 } 1598 }
1601 } 1599 }
1602 1600
1603 return net::QUIC_VERSION_UNSUPPORTED; 1601 return net::QUIC_VERSION_UNSUPPORTED;
1604 } 1602 }
OLDNEW
« no previous file with comments | « chrome/browser/history/chrome_history_backend_client.cc ('k') | chrome/browser/mac/keystone_glue.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698