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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "components/policy/core/common/cloud/policy_header_service.h" | 73 #include "components/policy/core/common/cloud/policy_header_service.h" |
74 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" | 74 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" |
75 #include "components/prefs/pref_service.h" | 75 #include "components/prefs/pref_service.h" |
76 #include "components/signin/core/common/signin_pref_names.h" | 76 #include "components/signin/core/common/signin_pref_names.h" |
77 #include "components/sync_driver/pref_names.h" | 77 #include "components/sync_driver/pref_names.h" |
78 #include "components/url_formatter/url_fixer.h" | 78 #include "components/url_formatter/url_fixer.h" |
79 #include "content/public/browser/browser_thread.h" | 79 #include "content/public/browser/browser_thread.h" |
80 #include "content/public/browser/host_zoom_map.h" | 80 #include "content/public/browser/host_zoom_map.h" |
81 #include "content/public/browser/notification_service.h" | 81 #include "content/public/browser/notification_service.h" |
82 #include "content/public/browser/resource_context.h" | 82 #include "content/public/browser/resource_context.h" |
| 83 #include "content/public/common/content_switches.h" |
83 #include "net/base/keygen_handler.h" | 84 #include "net/base/keygen_handler.h" |
84 #include "net/cert/cert_verifier.h" | 85 #include "net/cert/cert_verifier.h" |
85 #include "net/cert/ct_log_verifier.h" | 86 #include "net/cert/ct_log_verifier.h" |
86 #include "net/cert/multi_log_ct_verifier.h" | 87 #include "net/cert/multi_log_ct_verifier.h" |
87 #include "net/cookies/canonical_cookie.h" | 88 #include "net/cookies/canonical_cookie.h" |
88 #include "net/http/http_network_session.h" | 89 #include "net/http/http_network_session.h" |
89 #include "net/http/http_transaction_factory.h" | 90 #include "net/http/http_transaction_factory.h" |
90 #include "net/http/http_util.h" | 91 #include "net/http/http_util.h" |
91 #include "net/http/transport_security_persister.h" | 92 #include "net/http/transport_security_persister.h" |
92 #include "net/nqe/network_quality_estimator.h" | 93 #include "net/nqe/network_quality_estimator.h" |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1022 IOThread::Globals* const io_thread_globals = io_thread->globals(); | 1023 IOThread::Globals* const io_thread_globals = io_thread->globals(); |
1023 const base::CommandLine& command_line = | 1024 const base::CommandLine& command_line = |
1024 *base::CommandLine::ForCurrentProcess(); | 1025 *base::CommandLine::ForCurrentProcess(); |
1025 | 1026 |
1026 // Create the common request contexts. | 1027 // Create the common request contexts. |
1027 main_request_context_.reset(new net::URLRequestContext()); | 1028 main_request_context_.reset(new net::URLRequestContext()); |
1028 extensions_request_context_.reset(new net::URLRequestContext()); | 1029 extensions_request_context_.reset(new net::URLRequestContext()); |
1029 | 1030 |
1030 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); | 1031 main_request_context_->set_enable_brotli(io_thread_globals->enable_brotli); |
1031 | 1032 |
| 1033 // TODO(estark): Remove this once the Referrer-Policy header is no |
| 1034 // longer an experimental feature. https://crbug.com/619228 |
| 1035 main_request_context_->set_enable_referrer_policy_header( |
| 1036 command_line.HasSwitch(switches::kEnableExperimentalWebPlatformFeatures)); |
| 1037 |
1032 std::unique_ptr<ChromeNetworkDelegate> network_delegate( | 1038 std::unique_ptr<ChromeNetworkDelegate> network_delegate( |
1033 new ChromeNetworkDelegate( | 1039 new ChromeNetworkDelegate( |
1034 #if defined(ENABLE_EXTENSIONS) | 1040 #if defined(ENABLE_EXTENSIONS) |
1035 io_thread_globals->extension_event_router_forwarder.get(), | 1041 io_thread_globals->extension_event_router_forwarder.get(), |
1036 #else | 1042 #else |
1037 NULL, | 1043 NULL, |
1038 #endif | 1044 #endif |
1039 &enable_referrers_, io_thread->GetMetricsDataUseForwarder())); | 1045 &enable_referrers_, io_thread->GetMetricsDataUseForwarder())); |
1040 #if defined(ENABLE_EXTENSIONS) | 1046 #if defined(ENABLE_EXTENSIONS) |
1041 network_delegate->set_extension_info_map( | 1047 network_delegate->set_extension_info_map( |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 void ProfileIOData::SetCookieSettingsForTesting( | 1361 void ProfileIOData::SetCookieSettingsForTesting( |
1356 content_settings::CookieSettings* cookie_settings) { | 1362 content_settings::CookieSettings* cookie_settings) { |
1357 DCHECK(!cookie_settings_.get()); | 1363 DCHECK(!cookie_settings_.get()); |
1358 cookie_settings_ = cookie_settings; | 1364 cookie_settings_ = cookie_settings; |
1359 } | 1365 } |
1360 | 1366 |
1361 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( | 1367 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( |
1362 const GURL& url) const { | 1368 const GURL& url) const { |
1363 return url_blacklist_manager_->GetURLBlacklistState(url); | 1369 return url_blacklist_manager_->GetURLBlacklistState(url); |
1364 } | 1370 } |
OLD | NEW |