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

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

Issue 2024753002: Add permission reporter skeleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@protocol-buffer-for-permission-reports
Patch Set: Change SendReport function signature Created 4 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/safe_browsing/permission_reporter.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/permission_reporter.cc
diff --git a/chrome/browser/safe_browsing/permission_reporter.cc b/chrome/browser/safe_browsing/permission_reporter.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e251460b3910751bea23cd13763cef1401289780
--- /dev/null
+++ b/chrome/browser/safe_browsing/permission_reporter.cc
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/safe_browsing/permission_reporter.h"
+#include "chrome/common/safe_browsing/permission_report.pb.h"
+#include "content/public/browser/permission_type.h"
+
+using content::PermissionType;
+
+namespace safe_browsing {
+
+namespace {
+// URL to upload permission action reports.
+static const char kPermissionActionReportingUploadUrl[] =
Nathan Parker 2016/06/06 22:55:49 No need to say "static" if it's in an anonymous na
stefanocs 2016/06/07 03:07:44 Done.
+ "http://safebrowsing.googleusercontent.com/safebrowsing/clientreport/"
+ "permission-action";
+} // namespace
+
+PermissionReporter::PermissionReporter(net::URLRequestContext* request_context)
+ : upload_url_(kPermissionActionReportingUploadUrl) {}
Nathan Parker 2016/06/06 22:55:49 You probably don't need this as a member of the cl
stefanocs 2016/06/07 03:07:44 Done.
+
+PermissionReporter::~PermissionReporter() {}
+
+void PermissionReporter::SendReport(const GURL& origin,
+ content::PermissionType permission,
+ PermissionAction action) {
+ // TODO(stefanocs): Implement SendReport function.
Nathan Parker 2016/06/06 22:55:49 I'm assuming this will use a ReportSender, when th
stefanocs 2016/06/07 03:07:44 Yes, that's right.
+}
+
+// static
+bool PermissionReporter::BuildReport(const GURL& origin,
+ PermissionType permission,
+ PermissionAction action,
+ std::string* output) {
+ // TODO(stefanocs): Implement BuildReport function.
+ return true;
+}
+
+} // namespace safe_browsing
« no previous file with comments | « chrome/browser/safe_browsing/permission_reporter.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698