| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |