| Index: chrome/browser/safe_browsing/incident_reporting/state_store.cc
|
| diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store.cc b/chrome/browser/safe_browsing/incident_reporting/state_store.cc
|
| index 0b5768ea53ff9292a2863f5e8f02a3174292b54e..8d44d30aaa9253b8df65147feeff36274b603144 100644
|
| --- a/chrome/browser/safe_browsing/incident_reporting/state_store.cc
|
| +++ b/chrome/browser/safe_browsing/incident_reporting/state_store.cc
|
| @@ -64,12 +64,9 @@ void StateStore::Transaction::ClearForType(IncidentType type) {
|
| }
|
|
|
| void StateStore::Transaction::ClearAll() {
|
| - if (pref_update_)
|
| - pref_update_.reset();
|
| - if (store_->incidents_sent_) {
|
| - store_->incidents_sent_ = nullptr;
|
| - store_->profile_->GetPrefs()->ClearPref(prefs::kSafeBrowsingIncidentsSent);
|
| - }
|
| + // Clear the preference if it exists and contains any values.
|
| + if (store_->incidents_sent_ && !store_->incidents_sent_->empty())
|
| + GetPrefDict()->Clear();
|
| }
|
|
|
| base::DictionaryValue* StateStore::Transaction::GetPrefDict() {
|
|
|