| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/state_store.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/state_store.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/prefs/pref_service.h" | |
| 11 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 12 #include "base/values.h" | 11 #include "base/values.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" | 13 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| 15 #include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h
" | 14 #include "chrome/browser/safe_browsing/incident_reporting/platform_state_store.h
" |
| 16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/prefs/pref_service.h" |
| 17 | 17 |
| 18 namespace safe_browsing { | 18 namespace safe_browsing { |
| 19 | 19 |
| 20 // StateStore::Transaction ----------------------------------------------------- | 20 // StateStore::Transaction ----------------------------------------------------- |
| 21 | 21 |
| 22 StateStore::Transaction::Transaction(StateStore* store) : store_(store) { | 22 StateStore::Transaction::Transaction(StateStore* store) : store_(store) { |
| 23 #if DCHECK_IS_ON() | 23 #if DCHECK_IS_ON() |
| 24 DCHECK(!store_->has_transaction_); | 24 DCHECK(!store_->has_transaction_); |
| 25 store_->has_transaction_ = true; | 25 store_->has_transaction_ = true; |
| 26 #endif | 26 #endif |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 static const IncidentType kLegacyTypes[] = { | 169 static const IncidentType kLegacyTypes[] = { |
| 170 // TODO(grt): remove in M44 (crbug.com/451173). | 170 // TODO(grt): remove in M44 (crbug.com/451173). |
| 171 IncidentType::OMNIBOX_INTERACTION, | 171 IncidentType::OMNIBOX_INTERACTION, |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 for (IncidentType type : kLegacyTypes) | 174 for (IncidentType type : kLegacyTypes) |
| 175 transaction->ClearForType(type); | 175 transaction->ClearForType(type); |
| 176 } | 176 } |
| 177 | 177 |
| 178 } // namespace safe_browsing | 178 } // namespace safe_browsing |
| OLD | NEW |