| Index: net/url_request/report_sender.cc
|
| diff --git a/net/url_request/certificate_report_sender.cc b/net/url_request/report_sender.cc
|
| similarity index 63%
|
| rename from net/url_request/certificate_report_sender.cc
|
| rename to net/url_request/report_sender.cc
|
| index 672e29194ab0f2cba0537bbf25698d73c5b7798c..bc8e11d6b4705103247ffe17bdf5b5e7ddb3e268 100644
|
| --- a/net/url_request/certificate_report_sender.cc
|
| +++ b/net/url_request/report_sender.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "net/url_request/certificate_report_sender.h"
|
| +#include "net/url_request/report_sender.h"
|
|
|
| #include <utility>
|
|
|
| @@ -16,28 +16,23 @@
|
|
|
| namespace net {
|
|
|
| -CertificateReportSender::CertificateReportSender(
|
| - URLRequestContext* request_context,
|
| - CookiesPreference cookies_preference)
|
| - : CertificateReportSender(request_context,
|
| - cookies_preference,
|
| - ErrorCallback()) {}
|
| -
|
| -CertificateReportSender::CertificateReportSender(
|
| - URLRequestContext* request_context,
|
| - CookiesPreference cookies_preference,
|
| - const ErrorCallback& error_callback)
|
| +ReportSender::ReportSender(URLRequestContext* request_context,
|
| + CookiesPreference cookies_preference)
|
| + : ReportSender(request_context, cookies_preference, ErrorCallback()) {}
|
| +
|
| +ReportSender::ReportSender(URLRequestContext* request_context,
|
| + CookiesPreference cookies_preference,
|
| + const ErrorCallback& error_callback)
|
| : request_context_(request_context),
|
| cookies_preference_(cookies_preference),
|
| error_callback_(error_callback) {}
|
|
|
| -CertificateReportSender::~CertificateReportSender() {
|
| +ReportSender::~ReportSender() {
|
| // Cancel all of the uncompleted requests.
|
| STLDeleteElements(&inflight_requests_);
|
| }
|
|
|
| -void CertificateReportSender::Send(const GURL& report_uri,
|
| - const std::string& report) {
|
| +void ReportSender::Send(const GURL& report_uri, const std::string& report) {
|
| std::unique_ptr<URLRequest> url_request =
|
| request_context_->CreateRequest(report_uri, DEFAULT_PRIORITY, this);
|
|
|
| @@ -60,15 +55,13 @@ void CertificateReportSender::Send(const GURL& report_uri,
|
| raw_url_request->Start();
|
| }
|
|
|
| -void CertificateReportSender::SetErrorCallback(
|
| - const ErrorCallback& error_callback) {
|
| +void ReportSender::SetErrorCallback(const ErrorCallback& error_callback) {
|
| error_callback_ = error_callback;
|
| }
|
|
|
| -void CertificateReportSender::OnResponseStarted(URLRequest* request) {
|
| +void ReportSender::OnResponseStarted(URLRequest* request) {
|
| if (!request->status().is_success()) {
|
| - DVLOG(1) << "Failed to send certificate report for "
|
| - << request->url().host();
|
| + DVLOG(1) << "Failed to send report for " << request->url().host();
|
| if (!error_callback_.is_null())
|
| error_callback_.Run(request->url(), request->status().error());
|
| }
|
| @@ -78,8 +71,7 @@ void CertificateReportSender::OnResponseStarted(URLRequest* request) {
|
| delete request;
|
| }
|
|
|
| -void CertificateReportSender::OnReadCompleted(URLRequest* request,
|
| - int bytes_read) {
|
| +void ReportSender::OnReadCompleted(URLRequest* request, int bytes_read) {
|
| NOTREACHED();
|
| }
|
|
|
|
|