| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| 11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "build/build_config.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 16 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 16 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
| 17 #include "chrome/grit/generated_resources.h" | 18 #include "chrome/grit/generated_resources.h" |
| 18 #include "components/security_interstitials/core/controller_client.h" | 19 #include "components/security_interstitials/core/controller_client.h" |
| 19 #include "components/security_interstitials/core/metrics_helper.h" | 20 #include "components/security_interstitials/core/metrics_helper.h" |
| 20 #include "components/variations/variations_associated_data.h" | 21 #include "components/variations/variations_associated_data.h" |
| 21 #include "content/public/browser/browser_context.h" | 22 #include "content/public/browser/browser_context.h" |
| 22 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 } | 146 } |
| 146 #endif | 147 #endif |
| 147 return false; | 148 return false; |
| 148 } | 149 } |
| 149 | 150 |
| 150 bool CertReportHelper::IsPrefEnabled(const char* pref) { | 151 bool CertReportHelper::IsPrefEnabled(const char* pref) { |
| 151 Profile* profile = | 152 Profile* profile = |
| 152 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 153 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
| 153 return profile->GetPrefs()->GetBoolean(pref); | 154 return profile->GetPrefs()->GetBoolean(pref); |
| 154 } | 155 } |
| OLD | NEW |