Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: chrome/browser/profiles/profile_io_data.cc

Issue 2975903002: Make ProfileURLRequestContexts use their own CTPolicyEnforcer. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« chrome/browser/io_thread.cc ('K') | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "components/signin/core/common/signin_pref_names.h" 76 #include "components/signin/core/common/signin_pref_names.h"
77 #include "components/sync/base/pref_names.h" 77 #include "components/sync/base/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/notification_service.h" 80 #include "content/public/browser/notification_service.h"
81 #include "content/public/browser/resource_context.h" 81 #include "content/public/browser/resource_context.h"
82 #include "content/public/common/content_switches.h" 82 #include "content/public/common/content_switches.h"
83 #include "extensions/features/features.h" 83 #include "extensions/features/features.h"
84 #include "net/cert/cert_verifier.h" 84 #include "net/cert/cert_verifier.h"
85 #include "net/cert/ct_log_verifier.h" 85 #include "net/cert/ct_log_verifier.h"
86 #include "net/cert/ct_policy_enforcer.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/net_features.h" 93 #include "net/net_features.h"
93 #include "net/nqe/network_quality_estimator.h" 94 #include "net/nqe/network_quality_estimator.h"
94 #include "net/proxy/proxy_config_service_fixed.h" 95 #include "net/proxy/proxy_config_service_fixed.h"
95 #include "net/proxy/proxy_script_fetcher_impl.h" 96 #include "net/proxy/proxy_script_fetcher_impl.h"
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 ct_verifier->SetObserver(ct_tree_tracker_.get()); 1142 ct_verifier->SetObserver(ct_tree_tracker_.get());
1142 1143
1143 main_request_context_storage_->set_cert_transparency_verifier( 1144 main_request_context_storage_->set_cert_transparency_verifier(
1144 std::move(ct_verifier)); 1145 std::move(ct_verifier));
1145 1146
1146 io_thread->RegisterSTHObserver(ct_tree_tracker_.get()); 1147 io_thread->RegisterSTHObserver(ct_tree_tracker_.get());
1147 ct_tree_tracker_unregistration_ = 1148 ct_tree_tracker_unregistration_ =
1148 base::Bind(&IOThread::UnregisterSTHObserver, base::Unretained(io_thread), 1149 base::Bind(&IOThread::UnregisterSTHObserver, base::Unretained(io_thread),
1149 ct_tree_tracker_.get()); 1150 ct_tree_tracker_.get());
1150 1151
1151 main_request_context_->set_ct_policy_enforcer( 1152 main_request_context_storage_->set_ct_policy_enforcer(
1152 io_thread_globals->system_request_context->ct_policy_enforcer()); 1153 base::MakeUnique<net::CTPolicyEnforcer>());
1153 1154
1154 InitializeInternal(profile_params_.get(), protocol_handlers, 1155 InitializeInternal(profile_params_.get(), protocol_handlers,
1155 std::move(request_interceptors)); 1156 std::move(request_interceptors));
1156 1157
1157 net::NetworkTrafficAnnotationTag traffic_annotation = 1158 net::NetworkTrafficAnnotationTag traffic_annotation =
1158 net::DefineNetworkTrafficAnnotation("domain_security_policy", R"( 1159 net::DefineNetworkTrafficAnnotation("domain_security_policy", R"(
1159 semantics { 1160 semantics {
1160 sender: "Domain Security Policy" 1161 sender: "Domain Security Policy"
1161 description: 1162 description:
1162 "Websites can opt in to have Chrome send reports to them when " 1163 "Websites can opt in to have Chrome send reports to them when "
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 void ProfileIOData::SetCookieSettingsForTesting( 1377 void ProfileIOData::SetCookieSettingsForTesting(
1377 content_settings::CookieSettings* cookie_settings) { 1378 content_settings::CookieSettings* cookie_settings) {
1378 DCHECK(!cookie_settings_.get()); 1379 DCHECK(!cookie_settings_.get());
1379 cookie_settings_ = cookie_settings; 1380 cookie_settings_ = cookie_settings;
1380 } 1381 }
1381 1382
1382 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState( 1383 policy::URLBlacklist::URLBlacklistState ProfileIOData::GetURLBlacklistState(
1383 const GURL& url) const { 1384 const GURL& url) const {
1384 return url_blacklist_manager_->GetURLBlacklistState(url); 1385 return url_blacklist_manager_->GetURLBlacklistState(url);
1385 } 1386 }
OLDNEW
« chrome/browser/io_thread.cc ('K') | « chrome/browser/io_thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698