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

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

Issue 2047253002: Add hooks to permission layer for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-reporter-implementation
Patch Set: Add guard to permission reporting 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/ping_manager.cc
diff --git a/chrome/browser/safe_browsing/ping_manager.cc b/chrome/browser/safe_browsing/ping_manager.cc
index 5844350098184fd8791ebdbbafef3f374a90424a..54912d857c3c8b37a8b8460cf14d53c684d69162 100644
--- a/chrome/browser/safe_browsing/ping_manager.cc
+++ b/chrome/browser/safe_browsing/ping_manager.cc
@@ -10,6 +10,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "chrome/browser/safe_browsing/permission_reporter.h"
#include "components/certificate_reporting/error_reporter.h"
#include "content/public/browser/browser_thread.h"
#include "google_apis/google_api_keys.h"
@@ -74,6 +75,9 @@ SafeBrowsingPingManager::SafeBrowsingPingManager(
certificate_error_reporter_.reset(new certificate_reporting::ErrorReporter(
request_context_getter->GetURLRequestContext(), certificate_upload_url,
cookies_preference));
+
+ permission_reporter_.reset(
+ new PermissionReporter(request_context_getter->GetURLRequestContext()));
}
version_ = SafeBrowsingProtocolManagerHelper::Version();
@@ -141,6 +145,11 @@ void SafeBrowsingPingManager::SetCertificateErrorReporterForTesting(
certificate_error_reporter_ = std::move(certificate_error_reporter);
}
+PermissionReporter* SafeBrowsingPingManager::permission_reporter() {
+ DCHECK(permission_reporter_);
raymes 2016/06/14 02:47:11 nit: this isn't needed DCHECKs for null often are
stefanocs 2016/06/14 03:37:37 Done.
+ return permission_reporter_.get();
+}
+
GURL SafeBrowsingPingManager::SafeBrowsingHitUrl(
const safe_browsing::HitReport& hit_report) const {
DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE ||
« chrome/browser/safe_browsing/ping_manager.h ('K') | « chrome/browser/safe_browsing/ping_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698