OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ssl/cert_report_helper.h" | 5 #include "chrome/browser/ssl/cert_report_helper.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
11 #include "base/prefs/pref_service.h" | |
12 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
13 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
15 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
16 #include "build/build_config.h" | 15 #include "build/build_config.h" |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 17 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
19 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
20 #include "chrome/grit/generated_resources.h" | 19 #include "chrome/grit/generated_resources.h" |
| 20 #include "components/prefs/pref_service.h" |
21 #include "components/security_interstitials/core/controller_client.h" | 21 #include "components/security_interstitials/core/controller_client.h" |
22 #include "components/security_interstitials/core/metrics_helper.h" | 22 #include "components/security_interstitials/core/metrics_helper.h" |
23 #include "components/variations/variations_associated_data.h" | 23 #include "components/variations/variations_associated_data.h" |
24 #include "content/public/browser/browser_context.h" | 24 #include "content/public/browser/browser_context.h" |
25 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
27 | 27 |
28 // Constants for the HTTPSErrorReporter Finch experiment | 28 // Constants for the HTTPSErrorReporter Finch experiment |
29 const char CertReportHelper::kFinchExperimentName[] = "ReportCertificateErrors"; | 29 const char CertReportHelper::kFinchExperimentName[] = "ReportCertificateErrors"; |
30 const char CertReportHelper::kFinchGroupShowPossiblySend[] = | 30 const char CertReportHelper::kFinchGroupShowPossiblySend[] = |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 } | 148 } |
149 #endif | 149 #endif |
150 return false; | 150 return false; |
151 } | 151 } |
152 | 152 |
153 bool CertReportHelper::IsPrefEnabled(const char* pref) { | 153 bool CertReportHelper::IsPrefEnabled(const char* pref) { |
154 Profile* profile = | 154 Profile* profile = |
155 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 155 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
156 return profile->GetPrefs()->GetBoolean(pref); | 156 return profile->GetPrefs()->GetBoolean(pref); |
157 } | 157 } |
OLD | NEW |