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

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: Remove static marker in anon namespace 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
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/permission_reporter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..523de8e57057aa67d749f31333c690896448f132 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
@@ -37,6 +38,13 @@ class PermissionReporter {
content::PermissionType permission,
PermissionAction action);
+ private:
+ friend class PermissionReporterTest;
+
+ // Used by tests. This constructor allows tests to have access to the
+ // ReportSender.
+ explicit PermissionReporter(std::unique_ptr<net::ReportSender> report_sender);
+
// Builds and serializes a permission report with |origin| as the origin of
// the site requesting permission, |permission| as the type of permission
// requested, and |action| as the action taken. The serialized report is
@@ -47,7 +55,8 @@ class PermissionReporter {
PermissionAction action,
std::string* output);
- private:
+ std::unique_ptr<net::ReportSender> permission_report_sender_;
+
DISALLOW_COPY_AND_ASSIGN(PermissionReporter);
};
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/permission_reporter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698