| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #include "net/url_request/url_request_context_builder.h" | 107 #include "net/url_request/url_request_context_builder.h" |
| 108 #include "net/url_request/url_request_context_storage.h" | 108 #include "net/url_request/url_request_context_storage.h" |
| 109 #include "net/url_request/url_request_file_job.h" | 109 #include "net/url_request/url_request_file_job.h" |
| 110 #include "net/url_request/url_request_intercepting_job_factory.h" | 110 #include "net/url_request/url_request_intercepting_job_factory.h" |
| 111 #include "net/url_request/url_request_interceptor.h" | 111 #include "net/url_request/url_request_interceptor.h" |
| 112 #include "net/url_request/url_request_job_factory_impl.h" | 112 #include "net/url_request/url_request_job_factory_impl.h" |
| 113 #include "third_party/WebKit/public/public_features.h" | 113 #include "third_party/WebKit/public/public_features.h" |
| 114 | 114 |
| 115 #if BUILDFLAG(ENABLE_EXTENSIONS) | 115 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 116 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h" | 116 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h" |
| 117 #include "chrome/browser/extensions/extension_resource_protocols.h" | |
| 118 #include "extensions/browser/extension_protocols.h" | 117 #include "extensions/browser/extension_protocols.h" |
| 119 #include "extensions/browser/extension_system.h" | 118 #include "extensions/browser/extension_system.h" |
| 120 #include "extensions/browser/extension_throttle_manager.h" | 119 #include "extensions/browser/extension_throttle_manager.h" |
| 121 #include "extensions/browser/info_map.h" | 120 #include "extensions/browser/info_map.h" |
| 122 #include "extensions/common/constants.h" | 121 #include "extensions/common/constants.h" |
| 123 #endif | 122 #endif |
| 124 | 123 |
| 125 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 124 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 126 #include "chrome/browser/supervised_user/supervised_user_service.h" | 125 #include "chrome/browser/supervised_user/supervised_user_service.h" |
| 127 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 126 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 | 728 |
| 730 // static | 729 // static |
| 731 bool ProfileIOData::IsHandledProtocol(const std::string& scheme) { | 730 bool ProfileIOData::IsHandledProtocol(const std::string& scheme) { |
| 732 DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); | 731 DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); |
| 733 static const char* const kProtocolList[] = { | 732 static const char* const kProtocolList[] = { |
| 734 url::kFileScheme, | 733 url::kFileScheme, |
| 735 content::kChromeDevToolsScheme, | 734 content::kChromeDevToolsScheme, |
| 736 dom_distiller::kDomDistillerScheme, | 735 dom_distiller::kDomDistillerScheme, |
| 737 #if BUILDFLAG(ENABLE_EXTENSIONS) | 736 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 738 extensions::kExtensionScheme, | 737 extensions::kExtensionScheme, |
| 739 extensions::kExtensionResourceScheme, | |
| 740 #endif | 738 #endif |
| 741 content::kChromeUIScheme, | 739 content::kChromeUIScheme, |
| 742 url::kDataScheme, | 740 url::kDataScheme, |
| 743 #if defined(OS_CHROMEOS) | 741 #if defined(OS_CHROMEOS) |
| 744 content::kExternalFileScheme, | 742 content::kExternalFileScheme, |
| 745 #endif // defined(OS_CHROMEOS) | 743 #endif // defined(OS_CHROMEOS) |
| 746 #if defined(OS_ANDROID) | 744 #if defined(OS_ANDROID) |
| 747 url::kContentScheme, | 745 url::kContentScheme, |
| 748 #endif // defined(OS_ANDROID) | 746 #endif // defined(OS_ANDROID) |
| 749 url::kAboutScheme, | 747 url::kAboutScheme, |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 | 1189 |
| 1192 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1190 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 1193 DCHECK(extension_info_map_.get()); | 1191 DCHECK(extension_info_map_.get()); |
| 1194 // Check only for incognito (and not Chrome OS guest mode GUEST_PROFILE). | 1192 // Check only for incognito (and not Chrome OS guest mode GUEST_PROFILE). |
| 1195 bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE; | 1193 bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE; |
| 1196 set_protocol = job_factory->SetProtocolHandler( | 1194 set_protocol = job_factory->SetProtocolHandler( |
| 1197 extensions::kExtensionScheme, | 1195 extensions::kExtensionScheme, |
| 1198 extensions::CreateExtensionProtocolHandler(is_incognito, | 1196 extensions::CreateExtensionProtocolHandler(is_incognito, |
| 1199 extension_info_map_.get())); | 1197 extension_info_map_.get())); |
| 1200 DCHECK(set_protocol); | 1198 DCHECK(set_protocol); |
| 1201 set_protocol = job_factory->SetProtocolHandler( | |
| 1202 extensions::kExtensionResourceScheme, | |
| 1203 CreateExtensionResourceProtocolHandler()); | |
| 1204 DCHECK(set_protocol); | |
| 1205 #endif | 1199 #endif |
| 1206 set_protocol = job_factory->SetProtocolHandler( | 1200 set_protocol = job_factory->SetProtocolHandler( |
| 1207 url::kDataScheme, base::MakeUnique<net::DataProtocolHandler>()); | 1201 url::kDataScheme, base::MakeUnique<net::DataProtocolHandler>()); |
| 1208 DCHECK(set_protocol); | 1202 DCHECK(set_protocol); |
| 1209 #if defined(OS_CHROMEOS) | 1203 #if defined(OS_CHROMEOS) |
| 1210 if (profile_params_) { | 1204 if (profile_params_) { |
| 1211 set_protocol = job_factory->SetProtocolHandler( | 1205 set_protocol = job_factory->SetProtocolHandler( |
| 1212 content::kExternalFileScheme, | 1206 content::kExternalFileScheme, |
| 1213 base::MakeUnique<chromeos::ExternalFileProtocolHandler>( | 1207 base::MakeUnique<chromeos::ExternalFileProtocolHandler>( |
| 1214 profile_params_->profile)); | 1208 profile_params_->profile)); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 void ProfileIOData::SetCookieSettingsForTesting( | 1348 void ProfileIOData::SetCookieSettingsForTesting( |
| 1355 content_settings::CookieSettings* cookie_settings) { | 1349 content_settings::CookieSettings* cookie_settings) { |
| 1356 DCHECK(!cookie_settings_.get()); | 1350 DCHECK(!cookie_settings_.get()); |
| 1357 cookie_settings_ = cookie_settings; | 1351 cookie_settings_ = cookie_settings; |
| 1358 } | 1352 } |
| 1359 | 1353 |
| 1360 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1354 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1361 const GURL& url) const { | 1355 const GURL& url) const { |
| 1362 return url_blacklist_manager_->GetURLBlacklistState(url); | 1356 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1363 } | 1357 } |
| OLD | NEW |