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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 content::kFileScheme, | 609 content::kFileScheme, |
610 content::kChromeDevToolsScheme, | 610 content::kChromeDevToolsScheme, |
611 chrome::kDomDistillerScheme, | 611 chrome::kDomDistillerScheme, |
612 extensions::kExtensionScheme, | 612 extensions::kExtensionScheme, |
613 extensions::kExtensionResourceScheme, | 613 extensions::kExtensionResourceScheme, |
614 content::kChromeUIScheme, | 614 content::kChromeUIScheme, |
615 content::kDataScheme, | 615 content::kDataScheme, |
616 #if defined(OS_CHROMEOS) | 616 #if defined(OS_CHROMEOS) |
617 chrome::kDriveScheme, | 617 chrome::kDriveScheme, |
618 #endif // defined(OS_CHROMEOS) | 618 #endif // defined(OS_CHROMEOS) |
619 chrome::kAboutScheme, | 619 content::kAboutScheme, |
620 #if !defined(DISABLE_FTP_SUPPORT) | 620 #if !defined(DISABLE_FTP_SUPPORT) |
621 content::kFtpScheme, | 621 content::kFtpScheme, |
622 #endif // !defined(DISABLE_FTP_SUPPORT) | 622 #endif // !defined(DISABLE_FTP_SUPPORT) |
623 content::kBlobScheme, | 623 content::kBlobScheme, |
624 content::kFileSystemScheme, | 624 content::kFileSystemScheme, |
625 chrome::kChromeSearchScheme, | 625 chrome::kChromeSearchScheme, |
626 }; | 626 }; |
627 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 627 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
628 if (scheme == kProtocolList[i]) | 628 if (scheme == kProtocolList[i]) |
629 return true; | 629 return true; |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 #if defined(OS_CHROMEOS) | 1037 #if defined(OS_CHROMEOS) |
1038 if (!is_incognito() && profile_params_) { | 1038 if (!is_incognito() && profile_params_) { |
1039 set_protocol = job_factory->SetProtocolHandler( | 1039 set_protocol = job_factory->SetProtocolHandler( |
1040 chrome::kDriveScheme, | 1040 chrome::kDriveScheme, |
1041 new drive::DriveProtocolHandler(profile_params_->profile)); | 1041 new drive::DriveProtocolHandler(profile_params_->profile)); |
1042 DCHECK(set_protocol); | 1042 DCHECK(set_protocol); |
1043 } | 1043 } |
1044 #endif // defined(OS_CHROMEOS) | 1044 #endif // defined(OS_CHROMEOS) |
1045 | 1045 |
1046 job_factory->SetProtocolHandler( | 1046 job_factory->SetProtocolHandler( |
1047 chrome::kAboutScheme, | 1047 content::kAboutScheme, new chrome_browser_net::AboutProtocolHandler()); |
1048 new chrome_browser_net::AboutProtocolHandler()); | |
1049 #if !defined(DISABLE_FTP_SUPPORT) | 1048 #if !defined(DISABLE_FTP_SUPPORT) |
1050 DCHECK(ftp_transaction_factory); | 1049 DCHECK(ftp_transaction_factory); |
1051 job_factory->SetProtocolHandler( | 1050 job_factory->SetProtocolHandler( |
1052 content::kFtpScheme, | 1051 content::kFtpScheme, |
1053 new net::FtpProtocolHandler(ftp_transaction_factory)); | 1052 new net::FtpProtocolHandler(ftp_transaction_factory)); |
1054 #endif // !defined(DISABLE_FTP_SUPPORT) | 1053 #endif // !defined(DISABLE_FTP_SUPPORT) |
1055 | 1054 |
1056 scoped_ptr<net::URLRequestJobFactory> top_job_factory = | 1055 scoped_ptr<net::URLRequestJobFactory> top_job_factory = |
1057 job_factory.PassAs<net::URLRequestJobFactory>(); | 1056 job_factory.PassAs<net::URLRequestJobFactory>(); |
1058 #if defined(DEBUG_DEVTOOLS) | 1057 #if defined(DEBUG_DEVTOOLS) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 void ProfileIOData::SetCookieSettingsForTesting( | 1142 void ProfileIOData::SetCookieSettingsForTesting( |
1144 CookieSettings* cookie_settings) { | 1143 CookieSettings* cookie_settings) { |
1145 DCHECK(!cookie_settings_.get()); | 1144 DCHECK(!cookie_settings_.get()); |
1146 cookie_settings_ = cookie_settings; | 1145 cookie_settings_ = cookie_settings; |
1147 } | 1146 } |
1148 | 1147 |
1149 void ProfileIOData::set_signin_names_for_testing( | 1148 void ProfileIOData::set_signin_names_for_testing( |
1150 SigninNamesOnIOThread* signin_names) { | 1149 SigninNamesOnIOThread* signin_names) { |
1151 signin_names_.reset(signin_names); | 1150 signin_names_.reset(signin_names); |
1152 } | 1151 } |
OLD | NEW |