| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 net::URLRequestJob* MaybeInterceptRequest( | 227 net::URLRequestJob* MaybeInterceptRequest( |
| 228 net::URLRequest* request, | 228 net::URLRequest* request, |
| 229 net::NetworkDelegate* network_delegate) const override { | 229 net::NetworkDelegate* network_delegate) const override { |
| 230 base::FilePath path; | 230 base::FilePath path; |
| 231 if (IsSupportedDevToolsURL(request->url(), &path)) | 231 if (IsSupportedDevToolsURL(request->url(), &path)) |
| 232 return new net::URLRequestFileJob( | 232 return new net::URLRequestFileJob( |
| 233 request, network_delegate, path, | 233 request, network_delegate, path, |
| 234 base::CreateTaskRunnerWithTraits( | 234 base::CreateTaskRunnerWithTraits( |
| 235 base::TaskTraits() | 235 base::TaskTraits() |
| 236 .MayBlock() | 236 .MayBlock() |
| 237 .WithPriority(base::TaskPriority::BACKGROUND) | 237 .WithPriority(base::TaskPriority::USER_VISIBLE) |
| 238 .WithShutdownBehavior( | 238 .WithShutdownBehavior( |
| 239 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))); | 239 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN))); |
| 240 | 240 |
| 241 return NULL; | 241 return NULL; |
| 242 } | 242 } |
| 243 }; | 243 }; |
| 244 #endif // BUILDFLAG(DEBUG_DEVTOOLS) | 244 #endif // BUILDFLAG(DEBUG_DEVTOOLS) |
| 245 | 245 |
| 246 #if defined(OS_CHROMEOS) | 246 #if defined(OS_CHROMEOS) |
| 247 // The following four functions are responsible for initializing NSS for each | 247 // The following four functions are responsible for initializing NSS for each |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1130 net::NetworkDelegate* network_delegate, | 1130 net::NetworkDelegate* network_delegate, |
| 1131 net::HostResolver* host_resolver) const { | 1131 net::HostResolver* host_resolver) const { |
| 1132 // NOTE(willchan): Keep these protocol handlers in sync with | 1132 // NOTE(willchan): Keep these protocol handlers in sync with |
| 1133 // ProfileIOData::IsHandledProtocol(). | 1133 // ProfileIOData::IsHandledProtocol(). |
| 1134 bool set_protocol = job_factory->SetProtocolHandler( | 1134 bool set_protocol = job_factory->SetProtocolHandler( |
| 1135 url::kFileScheme, | 1135 url::kFileScheme, |
| 1136 base::MakeUnique<net::FileProtocolHandler>( | 1136 base::MakeUnique<net::FileProtocolHandler>( |
| 1137 base::CreateTaskRunnerWithTraits( | 1137 base::CreateTaskRunnerWithTraits( |
| 1138 base::TaskTraits() | 1138 base::TaskTraits() |
| 1139 .MayBlock() | 1139 .MayBlock() |
| 1140 .WithPriority(base::TaskPriority::BACKGROUND) | 1140 .WithPriority(base::TaskPriority::USER_VISIBLE) |
| 1141 .WithShutdownBehavior( | 1141 .WithShutdownBehavior( |
| 1142 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))); | 1142 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))); |
| 1143 DCHECK(set_protocol); | 1143 DCHECK(set_protocol); |
| 1144 | 1144 |
| 1145 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1145 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 1146 DCHECK(extension_info_map_.get()); | 1146 DCHECK(extension_info_map_.get()); |
| 1147 // Check only for incognito (and not Chrome OS guest mode GUEST_PROFILE). | 1147 // Check only for incognito (and not Chrome OS guest mode GUEST_PROFILE). |
| 1148 bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE; | 1148 bool is_incognito = profile_type() == Profile::INCOGNITO_PROFILE; |
| 1149 set_protocol = job_factory->SetProtocolHandler( | 1149 set_protocol = job_factory->SetProtocolHandler( |
| 1150 extensions::kExtensionScheme, | 1150 extensions::kExtensionScheme, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1163 profile_params_->profile)); | 1163 profile_params_->profile)); |
| 1164 DCHECK(set_protocol); | 1164 DCHECK(set_protocol); |
| 1165 } | 1165 } |
| 1166 #endif // defined(OS_CHROMEOS) | 1166 #endif // defined(OS_CHROMEOS) |
| 1167 #if defined(OS_ANDROID) | 1167 #if defined(OS_ANDROID) |
| 1168 set_protocol = job_factory->SetProtocolHandler( | 1168 set_protocol = job_factory->SetProtocolHandler( |
| 1169 url::kContentScheme, | 1169 url::kContentScheme, |
| 1170 content::ContentProtocolHandler::Create(base::CreateTaskRunnerWithTraits( | 1170 content::ContentProtocolHandler::Create(base::CreateTaskRunnerWithTraits( |
| 1171 base::TaskTraits() | 1171 base::TaskTraits() |
| 1172 .MayBlock() | 1172 .MayBlock() |
| 1173 .WithPriority(base::TaskPriority::BACKGROUND) | 1173 .WithPriority(base::TaskPriority::USER_VISIBLE) |
| 1174 .WithShutdownBehavior( | 1174 .WithShutdownBehavior( |
| 1175 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))); | 1175 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)))); |
| 1176 #endif | 1176 #endif |
| 1177 | 1177 |
| 1178 job_factory->SetProtocolHandler( | 1178 job_factory->SetProtocolHandler( |
| 1179 url::kAboutScheme, | 1179 url::kAboutScheme, |
| 1180 base::MakeUnique<about_handler::AboutProtocolHandler>()); | 1180 base::MakeUnique<about_handler::AboutProtocolHandler>()); |
| 1181 | 1181 |
| 1182 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) | 1182 #if !BUILDFLAG(DISABLE_FTP_SUPPORT) |
| 1183 job_factory->SetProtocolHandler( | 1183 job_factory->SetProtocolHandler( |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 void ProfileIOData::SetCookieSettingsForTesting( | 1301 void ProfileIOData::SetCookieSettingsForTesting( |
| 1302 content_settings::CookieSettings* cookie_settings) { | 1302 content_settings::CookieSettings* cookie_settings) { |
| 1303 DCHECK(!cookie_settings_.get()); | 1303 DCHECK(!cookie_settings_.get()); |
| 1304 cookie_settings_ = cookie_settings; | 1304 cookie_settings_ = cookie_settings; |
| 1305 } | 1305 } |
| 1306 | 1306 |
| 1307 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1307 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1308 const GURL& url) const { | 1308 const GURL& url) const { |
| 1309 return url_blacklist_manager_->GetURLBlacklistState(url); | 1309 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1310 } | 1310 } |
| OLD | NEW |