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

Unified Diff: chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc

Issue 1267383002: Allow preloaded pins to contain report URIs; remove special-case reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase fixup Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc
diff --git a/chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc b/chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc
deleted file mode 100644
index 0447b0e8dbcfaccf488490a2bd5db3dee6f8df6a..0000000000000000000000000000000000000000
--- a/chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ssl/chrome_fraudulent_certificate_reporter.h"
-
-#include "base/profiler/scoped_tracker.h"
-#include "chrome/browser/net/certificate_error_reporter.h"
-#include "chrome/browser/ssl/certificate_error_report.h"
-#include "net/ssl/ssl_info.h"
-#include "net/url_request/certificate_report_sender.h"
-#include "net/url_request/url_request_context.h"
-#include "url/gurl.h"
-
-namespace {
-
-// TODO(palmer): Switch to HTTPS when the error handling delegate is more
-// sophisticated. Ultimately we plan to attempt the report on many transports.
-const char kFraudulentCertificateUploadEndpoint[] =
- "http://clients3.google.com/log_cert_error";
-
-} // namespace
-
-ChromeFraudulentCertificateReporter::ChromeFraudulentCertificateReporter(
- net::URLRequestContext* request_context)
- : certificate_reporter_(new chrome_browser_net::CertificateErrorReporter(
- request_context,
- GURL(kFraudulentCertificateUploadEndpoint),
- net::CertificateReportSender::DO_NOT_SEND_COOKIES)) {}
-
-ChromeFraudulentCertificateReporter::ChromeFraudulentCertificateReporter(
- scoped_ptr<chrome_browser_net::CertificateErrorReporter>
- certificate_reporter)
- : certificate_reporter_(certificate_reporter.Pass()) {
-}
-
-ChromeFraudulentCertificateReporter::~ChromeFraudulentCertificateReporter() {
-}
-
-void ChromeFraudulentCertificateReporter::SendReport(
- const std::string& hostname,
- const net::SSLInfo& ssl_info) {
- // Do silent/automatic reporting ONLY for Google properties. For other
- // domains (when that is supported), Chrome will ask for user permission.
- if (!net::TransportSecurityState::IsGooglePinnedProperty(hostname))
- return;
-
- CertificateErrorReport report(hostname, ssl_info);
- std::string serialized_report;
- if (!report.Serialize(&serialized_report)) {
- LOG(ERROR) << "Failed to serialize pinning violation report.";
- return;
- }
-
- certificate_reporter_->SendPinningViolationReport(serialized_report);
-}

Powered by Google App Engine
This is Rietveld 408576698