| 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/certificate_reporting_test_utils.h" | 5 #include "chrome/browser/ssl/certificate_reporting_test_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/prefs/pref_service.h" | |
| 14 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 15 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/safe_browsing/ping_manager.h" | 17 #include "chrome/browser/safe_browsing/ping_manager.h" |
| 19 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 18 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 20 #include "chrome/browser/safe_browsing/ui_manager.h" | 19 #include "chrome/browser/safe_browsing/ui_manager.h" |
| 21 #include "chrome/browser/ssl/cert_report_helper.h" | 20 #include "chrome/browser/ssl/cert_report_helper.h" |
| 22 #include "chrome/browser/ssl/ssl_cert_reporter.h" | 21 #include "chrome/browser/ssl/ssl_cert_reporter.h" |
| 23 #include "chrome/browser/ui/browser.h" | 22 #include "chrome/browser/ui/browser.h" |
| 24 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 25 #include "components/certificate_reporting/error_report.h" | 24 #include "components/certificate_reporting/error_report.h" |
| 26 #include "components/certificate_reporting/error_reporter.h" | 25 #include "components/certificate_reporting/error_reporter.h" |
| 26 #include "components/prefs/pref_service.h" |
| 27 #include "components/variations/variations_associated_data.h" | 27 #include "components/variations/variations_associated_data.h" |
| 28 #include "net/url_request/certificate_report_sender.h" | 28 #include "net/url_request/certificate_report_sender.h" |
| 29 #include "net/url_request/url_request_context.h" | 29 #include "net/url_request/url_request_context.h" |
| 30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 32 | 32 |
| 33 using safe_browsing::SafeBrowsingService; | 33 using safe_browsing::SafeBrowsingService; |
| 34 using safe_browsing::SafeBrowsingUIManager; | 34 using safe_browsing::SafeBrowsingUIManager; |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 if (!base::StringToDouble(param, &sendingThreshold)) | 185 if (!base::StringToDouble(param, &sendingThreshold)) |
| 186 return CERT_REPORT_NOT_EXPECTED; | 186 return CERT_REPORT_NOT_EXPECTED; |
| 187 | 187 |
| 188 if (sendingThreshold == 1.0) | 188 if (sendingThreshold == 1.0) |
| 189 return certificate_reporting_test_utils::CERT_REPORT_EXPECTED; | 189 return certificate_reporting_test_utils::CERT_REPORT_EXPECTED; |
| 190 } | 190 } |
| 191 return certificate_reporting_test_utils::CERT_REPORT_NOT_EXPECTED; | 191 return certificate_reporting_test_utils::CERT_REPORT_NOT_EXPECTED; |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace certificate_reporting_test_utils | 194 } // namespace certificate_reporting_test_utils |
| OLD | NEW |