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

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

Issue 2390213002: Revert of Send a TrackedPreference incident when registry pref validation fails. (Closed)
Patch Set: Created 4 years, 2 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/preference_validation_delegate.cc
diff --git a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
index fc0b367f91b0e330caf05e232d3773b5ca6b6f26..512e894c7722e6baacccacdedfae54b519b9b11d 100644
--- a/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/preference_validation_delegate.cc
@@ -24,11 +24,10 @@
typedef ClientIncidentReport_IncidentData_TrackedPreferenceIncident_ValueState
TPIncident_ValueState;
-// Maps a primary PrefHashStoreTransaction::ValueState and an external
-// validation state to a TrackedPreferenceIncident::ValueState.
+// Maps a PrefHashStoreTransaction::ValueState to a
+// TrackedPreferenceIncident::ValueState.
TPIncident_ValueState MapValueState(
- PrefHashStoreTransaction::ValueState value_state,
- PrefHashStoreTransaction::ValueState external_validation_value_state) {
+ PrefHashStoreTransaction::ValueState value_state) {
switch (value_state) {
case PrefHashStoreTransaction::CLEARED:
return TPIncident::CLEARED;
@@ -37,14 +36,7 @@
case PrefHashStoreTransaction::UNTRUSTED_UNKNOWN_VALUE:
return TPIncident::UNTRUSTED_UNKNOWN_VALUE;
default:
- switch (external_validation_value_state) {
- case PrefHashStoreTransaction::CLEARED:
- return TPIncident::BYPASS_CLEARED;
- case PrefHashStoreTransaction::CHANGED:
- return TPIncident::BYPASS_CHANGED;
- default:
- return TPIncident::UNKNOWN;
- }
+ return TPIncident::UNKNOWN;
}
}
@@ -62,10 +54,8 @@
const std::string& pref_path,
const base::Value* value,
PrefHashStoreTransaction::ValueState value_state,
- PrefHashStoreTransaction::ValueState external_validation_value_state,
bool is_personal) {
- TPIncident_ValueState proto_value_state =
- MapValueState(value_state, external_validation_value_state);
+ TPIncident_ValueState proto_value_state = MapValueState(value_state);
if (proto_value_state != TPIncident::UNKNOWN) {
std::unique_ptr<TPIncident> incident(
new ClientIncidentReport_IncidentData_TrackedPreferenceIncident());
@@ -87,10 +77,8 @@
const base::DictionaryValue* /* dict_value */,
const std::vector<std::string>& invalid_keys,
PrefHashStoreTransaction::ValueState value_state,
- PrefHashStoreTransaction::ValueState external_validation_value_state,
bool is_personal) {
- TPIncident_ValueState proto_value_state =
- MapValueState(value_state, external_validation_value_state);
+ TPIncident_ValueState proto_value_state = MapValueState(value_state);
if (proto_value_state != TPIncident::UNKNOWN) {
std::unique_ptr<ClientIncidentReport_IncidentData_TrackedPreferenceIncident>
incident(

Powered by Google App Engine
This is Rietveld 408576698