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

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: 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
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..1b6154be985749e3c3c29b755bf76791bcdf69e6
--- /dev/null
+++ b/chrome/browser/safe_browsing/permission_reporter.cc
@@ -0,0 +1,35 @@
+// 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"
+
+using content::PermissionType;
+
+namespace safe_browsing {
+
+PermissionReporter::PermissionReporter(net::URLRequestContext* request_context,
+ const GURL& upload_url)
+ : permission_report_sender_(new net::CertificateReportSender(
+ request_context,
+ net::CertificateReportSender::CookiesPreference::
+ DO_NOT_SEND_COOKIES)),
+ upload_url_(upload_url) {
+ DCHECK(permission_report_sender_);
+ DCHECK(!upload_url.is_empty());
+}
+
+PermissionReporter::~PermissionReporter() {}
+
+void PermissionReporter::SendReport(const std::string& serialized_report) {
+ // TODO(stefanocs): Implement SendReport function.
+}
+
+PermissionReport PermissionReporter::BuildReport(const GURL& origin,
+ PermissionType permission,
+ PermissionAction action) {
+ // TODO(stefanocs): Implement BuildReport function.
+ return PermissionReport();
+}
+
+} // namespace safe_browsing

Powered by Google App Engine
This is Rietveld 408576698