| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/invalidation/invalidator_storage.h" | 5 #include "components/invalidation/invalidator_storage.h" |
| 6 | 6 |
| 7 #include "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/task_runner.h" | 15 #include "base/task_runner.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/common/pref_names.h" | 17 #include "components/invalidation/invalidation_prefs.h" |
| 18 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const char kInvalidatorMaxInvalidationVersions[] = | 22 const char kInvalidatorMaxInvalidationVersions[] = |
| 23 "invalidator.max_invalidation_versions"; | 23 "invalidator.max_invalidation_versions"; |
| 24 | 24 |
| 25 | 25 |
| 26 bool ValueToUnackedInvalidationStorageMap( | 26 bool ValueToUnackedInvalidationStorageMap( |
| 27 const base::ListValue& value, | 27 const base::ListValue& value, |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 void InvalidatorStorage::Clear() { | 129 void InvalidatorStorage::Clear() { |
| 130 DCHECK(thread_checker_.CalledOnValidThread()); | 130 DCHECK(thread_checker_.CalledOnValidThread()); |
| 131 pref_service_->ClearPref(prefs::kInvalidatorSavedInvalidations); | 131 pref_service_->ClearPref(prefs::kInvalidatorSavedInvalidations); |
| 132 pref_service_->ClearPref(prefs::kInvalidatorClientId); | 132 pref_service_->ClearPref(prefs::kInvalidatorClientId); |
| 133 pref_service_->ClearPref(prefs::kInvalidatorInvalidationState); | 133 pref_service_->ClearPref(prefs::kInvalidatorInvalidationState); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace invalidation | 136 } // namespace invalidation |
| OLD | NEW |