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

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

Issue 2624193004: Submit a sample of notification images to Safe Browsing (Closed)
Patch Set: Report net_error codes to UMA Created 3 years, 11 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/ping_manager.h ('k') | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2a42e9bbafbfa975000b387d50374c3bff5832dc..b223a15f2e44da561bb03974ddb00866de5dd54f 100644
--- a/chrome/browser/safe_browsing/ping_manager.cc
+++ b/chrome/browser/safe_browsing/ping_manager.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
+#include "chrome/browser/safe_browsing/notification_image_reporter.h"
#include "chrome/browser/safe_browsing/permission_reporter.h"
#include "components/data_use_measurement/core/data_use_user_data.h"
#include "content/public/browser/browser_thread.h"
@@ -24,6 +25,7 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_status.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "url/gurl.h"
using content::BrowserThread;
@@ -82,8 +84,10 @@ SafeBrowsingPingManager::SafeBrowsingPingManager(
DCHECK(!url_prefix_.empty());
if (request_context_getter) {
- permission_reporter_.reset(
- new PermissionReporter(request_context_getter->GetURLRequestContext()));
+ permission_reporter_ = base::MakeUnique<PermissionReporter>(
+ request_context_getter->GetURLRequestContext());
+ notification_image_reporter_ = base::MakeUnique<NotificationImageReporter>(
+ request_context_getter->GetURLRequestContext());
net_log_ = net::NetLogWithSource::Make(
request_context_getter->GetURLRequestContext()->net_log(),
@@ -170,6 +174,15 @@ void SafeBrowsingPingManager::ReportPermissionAction(
permission_reporter_->SendReport(report_info);
}
+void SafeBrowsingPingManager::ReportNotificationImage(
+ Profile* profile,
+ const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager,
+ const GURL& origin,
+ const SkBitmap& image) {
+ notification_image_reporter_->ReportNotificationImageOnIO(
+ profile, database_manager, origin, image);
+}
+
GURL SafeBrowsingPingManager::SafeBrowsingHitUrl(
const safe_browsing::HitReport& hit_report) const {
DCHECK(hit_report.threat_type == SB_THREAT_TYPE_URL_MALWARE ||
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.h ('k') | chrome/common/safe_browsing/csd.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698