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

Unified Diff: chrome/browser/io_thread.cc

Issue 782333002: Certificate Transparency: Adding finch and NetLog logging for EV certs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/net_log_event_type_list.h » ('j') | net/base/net_log_event_type_list.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 73f9f30c76fd0478ab167bc3d5d78f1ac7772f3b..b8ed1af5d7ef466e2bc20032de44151ffcdc69d9 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -323,6 +323,17 @@ bool IsStaleWhileRevalidateEnabled(const base::CommandLine& command_line) {
return group_name == "Enabled";
}
+bool IsCertificateTransparencyRequiredForEV(
+ const base::CommandLine& command_line) {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("CTRequiredForEVTrial");
+
+ if (command_line.HasSwitch(switches::kRequireCTForEV))
+ return true;
davidben 2014/12/08 22:42:35 Suuuper nitpicky nit that completely doesn't matte
Eran Messeri 2014/12/09 19:58:15 My understanding, from go/finch-and-flags, is that
+
+ return group_name == "RequirementEnforced";
+}
+
} // namespace
class IOThread::LoggingNetworkChangeObserver
@@ -643,12 +654,8 @@ void IOThread::InitAsync() {
}
net::CertPolicyEnforcer* policy_enforcer = NULL;
- // TODO(eranm): Control with Finch, crbug.com/437766
- if (command_line.HasSwitch(switches::kRequireCTForEV)) {
- policy_enforcer = new net::CertPolicyEnforcer(kNumKnownCTLogs, true);
- } else {
- policy_enforcer = new net::CertPolicyEnforcer(kNumKnownCTLogs, false);
- }
+ policy_enforcer = new net::CertPolicyEnforcer(
+ kNumKnownCTLogs, IsCertificateTransparencyRequiredForEV(command_line));
globals_->cert_policy_enforcer.reset(policy_enforcer);
globals_->ssl_config_service = GetSSLConfigService();
« no previous file with comments | « no previous file | net/base/net_log_event_type_list.h » ('j') | net/base/net_log_event_type_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698