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

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

Issue 11883038: Move is_incognito bit out of ChromeURLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded include Created 7 years, 11 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 | 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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 591 }
592 592
593 LazyInitializeInternal(profile_params_.get()); 593 LazyInitializeInternal(profile_params_.get());
594 594
595 profile_params_.reset(); 595 profile_params_.reset();
596 initialized_ = true; 596 initialized_ = true;
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());
602 context->set_http_user_agent_settings( 601 context->set_http_user_agent_settings(
603 chrome_http_user_agent_settings_.get()); 602 chrome_http_user_agent_settings_.get());
604 context->set_ssl_config_service(profile_params_->ssl_config_service); 603 context->set_ssl_config_service(profile_params_->ssl_config_service);
605 } 604 }
606 605
607 scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults( 606 scoped_ptr<net::URLRequestJobFactory> ProfileIOData::SetUpJobFactoryDefaults(
608 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, 607 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory,
609 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 608 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
610 protocol_handler_interceptor, 609 protocol_handler_interceptor,
611 net::NetworkDelegate* network_delegate, 610 net::NetworkDelegate* network_delegate,
612 net::FtpTransactionFactory* ftp_transaction_factory, 611 net::FtpTransactionFactory* ftp_transaction_factory,
613 net::FtpAuthCache* ftp_auth_cache) const { 612 net::FtpAuthCache* ftp_auth_cache) const {
614 // NOTE(willchan): Keep these protocol handlers in sync with 613 // NOTE(willchan): Keep these protocol handlers in sync with
615 // ProfileIOData::IsHandledProtocol(). 614 // ProfileIOData::IsHandledProtocol().
616 bool set_protocol = job_factory->SetProtocolHandler( 615 bool set_protocol = job_factory->SetProtocolHandler(
617 chrome::kFileScheme, new net::FileProtocolHandler()); 616 chrome::kFileScheme, new net::FileProtocolHandler());
618 DCHECK(set_protocol); 617 DCHECK(set_protocol);
619 618
620 set_protocol = job_factory->SetProtocolHandler( 619 set_protocol = job_factory->SetProtocolHandler(
621 chrome::kChromeDevToolsScheme, 620 chrome::kChromeDevToolsScheme,
622 CreateDevToolsProtocolHandler(chrome_url_data_manager_backend(), 621 CreateDevToolsProtocolHandler(chrome_url_data_manager_backend(),
623 network_delegate)); 622 network_delegate, is_incognito()));
624 DCHECK(set_protocol); 623 DCHECK(set_protocol);
625 set_protocol = job_factory->SetProtocolHandler( 624 set_protocol = job_factory->SetProtocolHandler(
626 extensions::kExtensionScheme, 625 extensions::kExtensionScheme,
627 CreateExtensionProtocolHandler(is_incognito(), GetExtensionInfoMap())); 626 CreateExtensionProtocolHandler(is_incognito(), GetExtensionInfoMap()));
628 DCHECK(set_protocol); 627 DCHECK(set_protocol);
629 set_protocol = job_factory->SetProtocolHandler( 628 set_protocol = job_factory->SetProtocolHandler(
630 chrome::kExtensionResourceScheme, 629 chrome::kExtensionResourceScheme,
631 CreateExtensionResourceProtocolHandler()); 630 CreateExtensionResourceProtocolHandler());
632 DCHECK(set_protocol); 631 DCHECK(set_protocol);
633 set_protocol = job_factory->SetProtocolHandler( 632 set_protocol = job_factory->SetProtocolHandler(
634 chrome::kChromeUIScheme, 633 chrome::kChromeUIScheme,
635 ChromeURLDataManagerBackend::CreateProtocolHandler( 634 ChromeURLDataManagerBackend::CreateProtocolHandler(
636 chrome_url_data_manager_backend_.get())); 635 chrome_url_data_manager_backend_.get(),
636 is_incognito()));
637 DCHECK(set_protocol); 637 DCHECK(set_protocol);
638 set_protocol = job_factory->SetProtocolHandler( 638 set_protocol = job_factory->SetProtocolHandler(
639 chrome::kDataScheme, new net::DataProtocolHandler()); 639 chrome::kDataScheme, new net::DataProtocolHandler());
640 DCHECK(set_protocol); 640 DCHECK(set_protocol);
641 #if defined(OS_CHROMEOS) 641 #if defined(OS_CHROMEOS)
642 if (!is_incognito() && profile_params_.get()) { 642 if (!is_incognito() && profile_params_.get()) {
643 set_protocol = job_factory->SetProtocolHandler( 643 set_protocol = job_factory->SetProtocolHandler(
644 chrome::kDriveScheme, 644 chrome::kDriveScheme,
645 new drive::DriveProtocolHandler(profile_params_->profile)); 645 new drive::DriveProtocolHandler(profile_params_->profile));
646 DCHECK(set_protocol); 646 DCHECK(set_protocol);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 void ProfileIOData::SetCookieSettingsForTesting( 733 void ProfileIOData::SetCookieSettingsForTesting(
734 CookieSettings* cookie_settings) { 734 CookieSettings* cookie_settings) {
735 DCHECK(!cookie_settings_.get()); 735 DCHECK(!cookie_settings_.get());
736 cookie_settings_ = cookie_settings; 736 cookie_settings_ = cookie_settings;
737 } 737 }
738 738
739 void ProfileIOData::set_signin_names_for_testing( 739 void ProfileIOData::set_signin_names_for_testing(
740 SigninNamesOnIOThread* signin_names) { 740 SigninNamesOnIOThread* signin_names) {
741 signin_names_.reset(signin_names); 741 signin_names_.reset(signin_names);
742 } 742 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/browser/ui/webui/chrome_url_data_manager_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698