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

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

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 globals_->proxy_script_fetcher_proxy_service.get(); 654 globals_->proxy_script_fetcher_proxy_service.get();
655 655
656 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession"); 656 TRACE_EVENT_BEGIN0("startup", "IOThread::InitAsync:HttpNetworkSession");
657 scoped_refptr<net::HttpNetworkSession> network_session( 657 scoped_refptr<net::HttpNetworkSession> network_session(
658 new net::HttpNetworkSession(session_params)); 658 new net::HttpNetworkSession(session_params));
659 globals_->proxy_script_fetcher_http_transaction_factory 659 globals_->proxy_script_fetcher_http_transaction_factory
660 .reset(new net::HttpNetworkLayer(network_session.get())); 660 .reset(new net::HttpNetworkLayer(network_session.get()));
661 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession"); 661 TRACE_EVENT_END0("startup", "IOThread::InitAsync:HttpNetworkSession");
662 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory( 662 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory(
663 new net::URLRequestJobFactoryImpl()); 663 new net::URLRequestJobFactoryImpl());
664 job_factory->SetProtocolHandler(content::kDataScheme, 664 job_factory->SetProtocolHandler(url::kDataScheme,
665 new net::DataProtocolHandler()); 665 new net::DataProtocolHandler());
666 job_factory->SetProtocolHandler( 666 job_factory->SetProtocolHandler(
667 content::kFileScheme, 667 url::kFileScheme,
668 new net::FileProtocolHandler( 668 new net::FileProtocolHandler(
669 content::BrowserThread::GetBlockingPool()-> 669 content::BrowserThread::GetBlockingPool()->
670 GetTaskRunnerWithShutdownBehavior( 670 GetTaskRunnerWithShutdownBehavior(
671 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))); 671 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
672 #if !defined(DISABLE_FTP_SUPPORT) 672 #if !defined(DISABLE_FTP_SUPPORT)
673 globals_->proxy_script_fetcher_ftp_transaction_factory.reset( 673 globals_->proxy_script_fetcher_ftp_transaction_factory.reset(
674 new net::FtpNetworkLayer(globals_->host_resolver.get())); 674 new net::FtpNetworkLayer(globals_->host_resolver.get()));
675 job_factory->SetProtocolHandler( 675 job_factory->SetProtocolHandler(
676 content::kFtpScheme, 676 url::kFtpScheme,
677 new net::FtpProtocolHandler( 677 new net::FtpProtocolHandler(
678 globals_->proxy_script_fetcher_ftp_transaction_factory.get())); 678 globals_->proxy_script_fetcher_ftp_transaction_factory.get()));
679 #endif 679 #endif
680 globals_->proxy_script_fetcher_url_request_job_factory = 680 globals_->proxy_script_fetcher_url_request_job_factory =
681 job_factory.PassAs<net::URLRequestJobFactory>(); 681 job_factory.PassAs<net::URLRequestJobFactory>();
682 682
683 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager()); 683 globals_->throttler_manager.reset(new net::URLRequestThrottlerManager());
684 globals_->throttler_manager->set_net_log(net_log_); 684 globals_->throttler_manager->set_net_log(net_log_);
685 // Always done in production, disabled only for unit tests. 685 // Always done in production, disabled only for unit tests.
686 globals_->throttler_manager->set_enable_thread_checks(true); 686 globals_->throttler_manager->set_enable_thread_checks(true);
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 std::string version_flag = 1217 std::string version_flag =
1218 command_line.GetSwitchValueASCII(switches::kQuicVersion); 1218 command_line.GetSwitchValueASCII(switches::kQuicVersion);
1219 for (size_t i = 0; i < supported_versions.size(); ++i) { 1219 for (size_t i = 0; i < supported_versions.size(); ++i) {
1220 net::QuicVersion version = supported_versions[i]; 1220 net::QuicVersion version = supported_versions[i];
1221 if (net::QuicVersionToString(version) == version_flag) { 1221 if (net::QuicVersionToString(version) == version_flag) {
1222 return version; 1222 return version;
1223 } 1223 }
1224 } 1224 }
1225 return net::QUIC_VERSION_UNSUPPORTED; 1225 return net::QUIC_VERSION_UNSUPPORTED;
1226 } 1226 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698