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

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

Issue 11785018: drive: Add Profile* as a member of DriveProtocolHandler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add availability check before initializing DriveProtocolHandler 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
« no previous file with comments | « chrome/browser/chromeos/drive/drive_protocol_handler.cc ('k') | no next file » | 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/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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 DCHECK(set_protocol); 632 DCHECK(set_protocol);
633 set_protocol = job_factory->SetProtocolHandler( 633 set_protocol = job_factory->SetProtocolHandler(
634 chrome::kChromeUIScheme, 634 chrome::kChromeUIScheme,
635 ChromeURLDataManagerBackend::CreateProtocolHandler( 635 ChromeURLDataManagerBackend::CreateProtocolHandler(
636 chrome_url_data_manager_backend_.get())); 636 chrome_url_data_manager_backend_.get()));
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()) { 642 if (!is_incognito() && profile_params_.get()) {
643 set_protocol = job_factory->SetProtocolHandler( 643 set_protocol = job_factory->SetProtocolHandler(
644 chrome::kDriveScheme, new drive::DriveProtocolHandler()); 644 chrome::kDriveScheme,
645 new drive::DriveProtocolHandler(profile_params_->profile));
645 DCHECK(set_protocol); 646 DCHECK(set_protocol);
646 } 647 }
647 #endif // defined(OS_CHROMEOS) 648 #endif // defined(OS_CHROMEOS)
648 649
649 job_factory->SetProtocolHandler( 650 job_factory->SetProtocolHandler(
650 chrome::kAboutScheme, 651 chrome::kAboutScheme,
651 new chrome_browser_net::AboutProtocolHandler()); 652 new chrome_browser_net::AboutProtocolHandler());
652 #if !defined(DISABLE_FTP_SUPPORT) 653 #if !defined(DISABLE_FTP_SUPPORT)
653 DCHECK(ftp_transaction_factory); 654 DCHECK(ftp_transaction_factory);
654 job_factory->SetProtocolHandler( 655 job_factory->SetProtocolHandler(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void ProfileIOData::SetCookieSettingsForTesting( 732 void ProfileIOData::SetCookieSettingsForTesting(
732 CookieSettings* cookie_settings) { 733 CookieSettings* cookie_settings) {
733 DCHECK(!cookie_settings_.get()); 734 DCHECK(!cookie_settings_.get());
734 cookie_settings_ = cookie_settings; 735 cookie_settings_ = cookie_settings;
735 } 736 }
736 737
737 void ProfileIOData::set_signin_names_for_testing( 738 void ProfileIOData::set_signin_names_for_testing(
738 SigninNamesOnIOThread* signin_names) { 739 SigninNamesOnIOThread* signin_names) {
739 signin_names_.reset(signin_names); 740 signin_names_.reset(signin_names);
740 } 741 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/drive_protocol_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698