| 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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 set_protocol = job_factory->SetProtocolHandler( | 638 set_protocol = job_factory->SetProtocolHandler( |
| 639 chrome::kChromeUIScheme, | 639 chrome::kChromeUIScheme, |
| 640 ChromeURLDataManagerBackend::CreateProtocolHandler( | 640 ChromeURLDataManagerBackend::CreateProtocolHandler( |
| 641 chrome_url_data_manager_backend_.get())); | 641 chrome_url_data_manager_backend_.get())); |
| 642 DCHECK(set_protocol); | 642 DCHECK(set_protocol); |
| 643 set_protocol = job_factory->SetProtocolHandler( | 643 set_protocol = job_factory->SetProtocolHandler( |
| 644 chrome::kDataScheme, new net::DataProtocolHandler()); | 644 chrome::kDataScheme, new net::DataProtocolHandler()); |
| 645 DCHECK(set_protocol); | 645 DCHECK(set_protocol); |
| 646 #if defined(OS_CHROMEOS) | 646 #if defined(OS_CHROMEOS) |
| 647 if (!is_incognito()) { | 647 if (!is_incognito()) { |
| 648 Profile* profile = (Profile*) profile_params_->profile; |
| 649 |
| 648 set_protocol = job_factory->SetProtocolHandler( | 650 set_protocol = job_factory->SetProtocolHandler( |
| 649 chrome::kDriveScheme, new drive::DriveProtocolHandler()); | 651 chrome::kDriveScheme, new drive::DriveProtocolHandler(profile)); |
| 650 DCHECK(set_protocol); | 652 DCHECK(set_protocol); |
| 651 } | 653 } |
| 652 #endif // defined(OS_CHROMEOS) | 654 #endif // defined(OS_CHROMEOS) |
| 653 | 655 |
| 654 job_factory->SetProtocolHandler( | 656 job_factory->SetProtocolHandler( |
| 655 chrome::kAboutScheme, | 657 chrome::kAboutScheme, |
| 656 new chrome_browser_net::AboutProtocolHandler()); | 658 new chrome_browser_net::AboutProtocolHandler()); |
| 657 #if !defined(DISABLE_FTP_SUPPORT) | 659 #if !defined(DISABLE_FTP_SUPPORT) |
| 658 DCHECK(ftp_transaction_factory); | 660 DCHECK(ftp_transaction_factory); |
| 659 job_factory->SetProtocolHandler( | 661 job_factory->SetProtocolHandler( |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 void ProfileIOData::SetCookieSettingsForTesting( | 730 void ProfileIOData::SetCookieSettingsForTesting( |
| 729 CookieSettings* cookie_settings) { | 731 CookieSettings* cookie_settings) { |
| 730 DCHECK(!cookie_settings_.get()); | 732 DCHECK(!cookie_settings_.get()); |
| 731 cookie_settings_ = cookie_settings; | 733 cookie_settings_ = cookie_settings; |
| 732 } | 734 } |
| 733 | 735 |
| 734 void ProfileIOData::set_signin_names_for_testing( | 736 void ProfileIOData::set_signin_names_for_testing( |
| 735 SigninNamesOnIOThread* signin_names) { | 737 SigninNamesOnIOThread* signin_names) { |
| 736 signin_names_.reset(signin_names); | 738 signin_names_.reset(signin_names); |
| 737 } | 739 } |
| OLD | NEW |