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

Unified Diff: chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc

Issue 856543004: Replace incident type handlers with implementations of Incident. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc b/chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc
index ddb9662d955d068eb721d465921e79cf0c56c239..462644f35b032ecfa769000f67065283f25a0a86 100644
--- a/chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyzer_win.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/install_verification/win/module_info.h"
#include "chrome/browser/install_verification/win/module_verification_common.h"
#include "chrome/browser/safe_browsing/binary_feature_extractor.h"
-#include "chrome/browser/safe_browsing/incident_reporting/add_incident_callback.h"
+#include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_incident.h"
#include "chrome/browser/safe_browsing/path_sanitizer.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/safe_browsing/csd.pb.h"
@@ -51,10 +51,9 @@ void VerifyBlacklistLoadState(const AddIncidentCallback& callback) {
const bool blacklist_intialized = blacklist::IsBlacklistInitialized();
for (const auto& module_name : module_names) {
- scoped_ptr<ClientIncidentReport_IncidentData> incident_data(
- new ClientIncidentReport_IncidentData());
- ClientIncidentReport_IncidentData_BlacklistLoadIncident* blacklist_load =
- incident_data->mutable_blacklist_load();
+ scoped_ptr<ClientIncidentReport_IncidentData_BlacklistLoadIncident>
+ blacklist_load(
+ new ClientIncidentReport_IncidentData_BlacklistLoadIncident());
const base::FilePath module_path(module_name);
@@ -96,7 +95,8 @@ void VerifyBlacklistLoadState(const AddIncidentCallback& callback) {
module_path, blacklist_load->mutable_image_headers());
// Send the report.
- callback.Run(incident_data.Pass());
+ callback.Run(
+ make_scoped_ptr(new BlacklistLoadIncident(blacklist_load.Pass())));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698