| 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 IOThread::Globals* const io_thread_globals = io_thread->globals(); | 1030 IOThread::Globals* const io_thread_globals = io_thread->globals(); |
| 1031 const base::CommandLine& command_line = | 1031 const base::CommandLine& command_line = |
| 1032 *base::CommandLine::ForCurrentProcess(); | 1032 *base::CommandLine::ForCurrentProcess(); |
| 1033 | 1033 |
| 1034 // Create the common request contexts. | 1034 // Create the common request contexts. |
| 1035 main_request_context_.reset(new net::URLRequestContext()); | 1035 main_request_context_.reset(new net::URLRequestContext()); |
| 1036 extensions_request_context_.reset(new net::URLRequestContext()); | 1036 extensions_request_context_.reset(new net::URLRequestContext()); |
| 1037 | 1037 |
| 1038 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); | 1038 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); |
| 1039 | 1039 |
| 1040 // TODO(estark): Remove this once the Referrer-Policy header is no | |
| 1041 // longer an experimental feature. https://crbug.com/619228 | |
| 1042 main_request_context_->set_enable_referrer_policy_header( | |
| 1043 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)); | |
| 1044 | |
| 1045 std::unique_ptr<ChromeNetworkDelegate> network_delegate( | 1040 std::unique_ptr<ChromeNetworkDelegate> network_delegate( |
| 1046 new ChromeNetworkDelegate( | 1041 new ChromeNetworkDelegate( |
| 1047 #if defined(ENABLE_EXTENSIONS) | 1042 #if defined(ENABLE_EXTENSIONS) |
| 1048 io_thread_globals->extension_event_router_forwarder.get(), | 1043 io_thread_globals->extension_event_router_forwarder.get(), |
| 1049 #else | 1044 #else |
| 1050 NULL, | 1045 NULL, |
| 1051 #endif | 1046 #endif |
| 1052 &enable_referrers_, io_thread->GetMetricsDataUseForwarder())); | 1047 &enable_referrers_, io_thread->GetMetricsDataUseForwarder())); |
| 1053 #if defined(ENABLE_EXTENSIONS) | 1048 #if defined(ENABLE_EXTENSIONS) |
| 1054 network_delegate->set_extension_info_map( | 1049 network_delegate->set_extension_info_map( |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 void ProfileIOData::SetCookieSettingsForTesting( | 1372 void ProfileIOData::SetCookieSettingsForTesting( |
| 1378 content_settings::CookieSettings* cookie_settings) { | 1373 content_settings::CookieSettings* cookie_settings) { |
| 1379 DCHECK(!cookie_settings_.get()); | 1374 DCHECK(!cookie_settings_.get()); |
| 1380 cookie_settings_ = cookie_settings; | 1375 cookie_settings_ = cookie_settings; |
| 1381 } | 1376 } |
| 1382 | 1377 |
| 1383 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1378 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
| 1384 const GURL& url) const { | 1379 const GURL& url) const { |
| 1385 return url_blacklist_manager_->GetURLBlacklistState(url); | 1380 return url_blacklist_manager_->GetURLBlacklistState(url); |
| 1386 } | 1381 } |
| OLD | NEW |