| Index: chrome/browser/net/certificate_error_reporter_unittest.cc
|
| diff --git a/chrome/browser/net/certificate_error_reporter_unittest.cc b/chrome/browser/net/certificate_error_reporter_unittest.cc
|
| index f890f97d5e760d353bd53b7e2184155bfae98f7a..36f60569fa835d974a0514cca4f848f4dd9d9fd5 100644
|
| --- a/chrome/browser/net/certificate_error_reporter_unittest.cc
|
| +++ b/chrome/browser/net/certificate_error_reporter_unittest.cc
|
| @@ -174,12 +174,13 @@ TEST_F(CertificateErrorReporterTest, SendReportSendsRequest) {
|
| GURL url = net::URLRequestMockDataJob::GetMockHttpsUrl("dummy data", 1);
|
| network_delegate()->set_expected_url(url);
|
|
|
| - CertificateErrorReporter reporter(context(), url);
|
| + scoped_refptr<CertificateErrorReporter> reporter =
|
| + new CertificateErrorReporter(context(), url);
|
|
|
| EXPECT_EQ(0, network_delegate()->num_requests());
|
|
|
| - reporter.SendReport(CertificateErrorReporter::REPORT_TYPE_PINNING_VIOLATION,
|
| - kHostname, GetTestSSLInfo());
|
| + reporter->SendReport(CertificateErrorReporter::REPORT_TYPE_PINNING_VIOLATION,
|
| + kHostname, GetTestSSLInfo());
|
| run_loop.Run();
|
|
|
| EXPECT_EQ(1, network_delegate()->num_requests());
|
| @@ -199,11 +200,11 @@ TEST_F(CertificateErrorReporterTest, PendingRequestGetsDeleted) {
|
|
|
| EXPECT_EQ(0, network_delegate()->num_requests());
|
|
|
| - scoped_ptr<CertificateErrorReporter> reporter(
|
| + scoped_refptr<CertificateErrorReporter> reporter(
|
| new CertificateErrorReporter(context(), url));
|
| reporter->SendReport(CertificateErrorReporter::REPORT_TYPE_PINNING_VIOLATION,
|
| kHostname, GetTestSSLInfo());
|
| - reporter.reset();
|
| + reporter = nullptr;
|
|
|
| run_loop.Run();
|
|
|
| @@ -221,9 +222,10 @@ TEST_F(CertificateErrorReporterTest, ErroredRequestGetsDeleted) {
|
|
|
| EXPECT_EQ(0, network_delegate()->num_requests());
|
|
|
| - CertificateErrorReporter reporter(context(), url);
|
| - reporter.SendReport(CertificateErrorReporter::REPORT_TYPE_PINNING_VIOLATION,
|
| - kHostname, GetTestSSLInfo());
|
| + scoped_refptr<CertificateErrorReporter> reporter =
|
| + new CertificateErrorReporter(context(), url);
|
| + reporter->SendReport(CertificateErrorReporter::REPORT_TYPE_PINNING_VIOLATION,
|
| + kHostname, GetTestSSLInfo());
|
| run_loop.Run();
|
|
|
| EXPECT_EQ(1, network_delegate()->num_requests());
|
|
|