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

Unified Diff: chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 years, 7 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
diff --git a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
index bafed99937f51a64d83d9dfad16997a22722dd4a..3c3a16f6f55dce93866f61a88a907f3867b8598c 100644
--- a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
+++ b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
@@ -151,22 +151,22 @@ class MockReporter : public ChromeFraudulentCertificateReporter {
};
static void DoReportIsSent() {
- scoped_refptr<ChromeURLRequestContext> context = new ChromeURLRequestContext;
- SendingTestReporter reporter(context.get());
+ ChromeURLRequestContext context;
+ SendingTestReporter reporter(&context);
SSLInfo info = GetGoodSSLInfo();
reporter.SendReport("mail.google.com", info, true);
}
static void DoReportIsNotSent() {
- scoped_refptr<ChromeURLRequestContext> context = new ChromeURLRequestContext;
- NotSendingTestReporter reporter(context.get());
+ ChromeURLRequestContext context;
+ NotSendingTestReporter reporter(&context);
SSLInfo info = GetBadSSLInfo();
reporter.SendReport("www.example.com", info, true);
}
static void DoMockReportIsSent() {
- scoped_refptr<ChromeURLRequestContext> context = new ChromeURLRequestContext;
- MockReporter reporter(context.get());
+ ChromeURLRequestContext context;
+ MockReporter reporter(&context);
SSLInfo info = GetGoodSSLInfo();
reporter.SendReport("mail.google.com", info, true);
}
@@ -201,4 +201,3 @@ TEST(ChromeFraudulentCertificateReporterTest, ReportIsNotSent) {
}
} // namespace chrome_browser_net
-
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698