Chromium Code Reviews| 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( |
|
Jialiu Lin
2017/01/19 18:54:47
Do finch and Scout checks here,
if(finch && scout
harkness
2017/01/19 20:09:09
As mentioned in the other comment, this needs to h
Jialiu Lin
2017/01/19 23:10:40
Acknowledged.
|
| + 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 || |