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

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 11293252: Change Interceptors into URLRequestJobFactory::ProtocolHandlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PolicyTests to unregister with URLRequestFilter Created 8 years 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 | Annotate | Revision Log
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/profiles/profile_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 598
599 void ProfileIOData::ApplyProfileParamsToContext( 599 void ProfileIOData::ApplyProfileParamsToContext(
600 ChromeURLRequestContext* context) const { 600 ChromeURLRequestContext* context) const {
601 context->set_is_incognito(is_incognito()); 601 context->set_is_incognito(is_incognito());
602 context->set_http_user_agent_settings( 602 context->set_http_user_agent_settings(
603 chrome_http_user_agent_settings_.get()); 603 chrome_http_user_agent_settings_.get());
604 context->set_ssl_config_service(profile_params_->ssl_config_service); 604 context->set_ssl_config_service(profile_params_->ssl_config_service);
605 } 605 }
606 606
607 void ProfileIOData::SetUpJobFactoryDefaults( 607 scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
608 net::URLRequestJobFactoryImpl* job_factory, 608 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory,
609 scoped_ptr<net::URLRequestJobFactory::Interceptor> 609 scoped_ptr<net::URLRequestJobFactory::Interceptor>
610 protocol_handler_interceptor, 610 protocol_handler_interceptor,
611 net::NetworkDelegate* network_delegate, 611 net::NetworkDelegate* network_delegate,
612 net::FtpTransactionFactory* ftp_transaction_factory, 612 net::FtpTransactionFactory* ftp_transaction_factory,
613 net::FtpAuthCache* ftp_auth_cache) const { 613 net::FtpAuthCache* ftp_auth_cache) const {
614 // NOTE(willchan): Keep these protocol handlers in sync with 614 // NOTE(willchan): Keep these protocol handlers in sync with
615 // ProfileIOData::IsHandledProtocol(). 615 // ProfileIOData::IsHandledProtocol().
616 bool set_protocol = job_factory->SetProtocolHandler( 616 bool set_protocol = job_factory->SetProtocolHandler(
617 chrome::kFileScheme, new net::FileProtocolHandler()); 617 chrome::kFileScheme, new net::FileProtocolHandler());
618 DCHECK(set_protocol); 618 DCHECK(set_protocol);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 job_factory->SetProtocolHandler( 654 job_factory->SetProtocolHandler(
655 chrome::kAboutScheme, 655 chrome::kAboutScheme,
656 new chrome_browser_net::AboutProtocolHandler()); 656 new chrome_browser_net::AboutProtocolHandler());
657 #if !defined(DISABLE_FTP_SUPPORT) 657 #if !defined(DISABLE_FTP_SUPPORT)
658 DCHECK(ftp_transaction_factory); 658 DCHECK(ftp_transaction_factory);
659 job_factory->SetProtocolHandler( 659 job_factory->SetProtocolHandler(
660 chrome::kFtpScheme, 660 chrome::kFtpScheme,
661 new net::FtpProtocolHandler(ftp_transaction_factory, 661 new net::FtpProtocolHandler(ftp_transaction_factory,
662 ftp_auth_cache)); 662 ftp_auth_cache));
663 #endif // !defined(DISABLE_FTP_SUPPORT) 663 #endif // !defined(DISABLE_FTP_SUPPORT)
664 return job_factory.PassAs<net::URLRequestJobFactory>();
664 } 665 }
665 666
666 void ProfileIOData::ShutdownOnUIThread() { 667 void ProfileIOData::ShutdownOnUIThread() {
667 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 668 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
668 669
669 if (signin_names_) 670 if (signin_names_)
670 signin_names_->ReleaseResourcesOnUIThread(); 671 signin_names_->ReleaseResourcesOnUIThread();
671 672
672 google_services_username_.Destroy(); 673 google_services_username_.Destroy();
673 google_services_username_pattern_.Destroy(); 674 google_services_username_pattern_.Destroy();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 void ProfileIOData::SetCookieSettingsForTesting( 729 void ProfileIOData::SetCookieSettingsForTesting(
729 CookieSettings* cookie_settings) { 730 CookieSettings* cookie_settings) {
730 DCHECK(!cookie_settings_.get()); 731 DCHECK(!cookie_settings_.get());
731 cookie_settings_ = cookie_settings; 732 cookie_settings_ = cookie_settings;
732 } 733 }
733 734
734 void ProfileIOData::set_signin_names_for_testing( 735 void ProfileIOData::set_signin_names_for_testing(
735 SigninNamesOnIOThread* signin_names) { 736 SigninNamesOnIOThread* signin_names) {
736 signin_names_.reset(signin_names); 737 signin_names_.reset(signin_names);
737 } 738 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698