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

Unified Diff: chrome/browser/safe_browsing/permission_reporter.h

Issue 2035753004: Add implementation of PermissionReporter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor-certificate-report-sender
Patch Set: Fix small mistakes Created 4 years, 6 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/safe_browsing/permission_reporter.h
diff --git a/chrome/browser/safe_browsing/permission_reporter.h b/chrome/browser/safe_browsing/permission_reporter.h
index a226dcf330d1b008429fa653b5fd10baf550a485..5fa62d58c054bd882cc85f8b6f05eaa1a5464c00 100644
--- a/chrome/browser/safe_browsing/permission_reporter.h
+++ b/chrome/browser/safe_browsing/permission_reporter.h
@@ -11,6 +11,7 @@
#include "url/gurl.h"
namespace net {
+class ReportSender;
class URLRequestContext;
} // namespace net
@@ -25,6 +26,10 @@ class PermissionReporter {
// context for the reports.
explicit PermissionReporter(net::URLRequestContext* request_context);
+ // Used by tests. This constructor allows tests to have access to the
+ // ReportSender.
+ explicit PermissionReporter(std::unique_ptr<net::ReportSender> report_sender);
raymes 2016/06/09 01:30:40 We might as well make this private and make the te
stefanocs 2016/06/09 05:56:11 Done.
+
~PermissionReporter();
// Sends a serialized permission report to the report collection server.
@@ -48,6 +53,8 @@ class PermissionReporter {
std::string* output);
private:
+ std::unique_ptr<net::ReportSender> permission_report_sender_;
+
DISALLOW_COPY_AND_ASSIGN(PermissionReporter);
};

Powered by Google App Engine
This is Rietveld 408576698