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

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

Issue 1212973002: Add net::CertificateReportSender for handling cert report sending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing NET_EXPORT Created 5 years, 5 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/certificate_reporting_test_utils.cc
diff --git a/chrome/browser/ssl/certificate_reporting_test_utils.cc b/chrome/browser/ssl/certificate_reporting_test_utils.cc
index 06e7dd2bf6e4c928426affdb704c512b91ba3cf6..74e9fa82def7a19fd61fd8aefd7187498593f85f 100644
--- a/chrome/browser/ssl/certificate_reporting_test_utils.cc
+++ b/chrome/browser/ssl/certificate_reporting_test_utils.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/pref_names.h"
#include "components/variations/variations_associated_data.h"
+#include "net/url_request/certificate_report_sender.h"
#include "net/url_request/url_request_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -45,9 +46,10 @@ namespace CertificateReportingTestUtils {
// network.
class MockReporter : public chrome_browser_net::CertificateErrorReporter {
public:
- MockReporter(net::URLRequestContext* request_context,
- const GURL& upload_url,
- CookiesPreference cookies_preference);
+ MockReporter(
+ net::URLRequestContext* request_context,
+ const GURL& upload_url,
+ net::CertificateReportSender::CookiesPreference cookies_preference);
// CertificateErrorReporter implementation
void SendReport(CertificateErrorReporter::ReportType type,
@@ -65,13 +67,13 @@ class MockReporter : public chrome_browser_net::CertificateErrorReporter {
DISALLOW_COPY_AND_ASSIGN(MockReporter);
};
-MockReporter::MockReporter(net::URLRequestContext* request_context,
- const GURL& upload_url,
- CookiesPreference cookies_preference)
+MockReporter::MockReporter(
+ net::URLRequestContext* request_context,
+ const GURL& upload_url,
+ net::CertificateReportSender::CookiesPreference cookies_preference)
: CertificateErrorReporter(request_context,
upload_url,
- cookies_preference) {
-}
+ cookies_preference) {}
void MockReporter::SendReport(CertificateErrorReporter::ReportType type,
const std::string& serialized_report) {
@@ -87,8 +89,9 @@ void CertificateReportingTest::SetUpMockReporter() {
// because the MockReporter doesn't actually use a
// request_context. (In order to pass a real request_context, the
// reporter would have to be constructed on the IO thread.)
- reporter_ = new MockReporter(nullptr, GURL("http://example.test"),
- MockReporter::DO_NOT_SEND_COOKIES);
+ reporter_ =
+ new MockReporter(nullptr, GURL("http://example.test"),
+ net::CertificateReportSender::DO_NOT_SEND_COOKIES);
scoped_refptr<SafeBrowsingService> safe_browsing_service =
g_browser_process->safe_browsing_service();
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.cc ('k') | chrome/browser/ssl/chrome_fraudulent_certificate_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698