Chromium Code Reviews| Index: chrome/browser/sync/invalidations/invalidator_storage.cc |
| diff --git a/chrome/browser/sync/invalidations/invalidator_storage.cc b/chrome/browser/sync/invalidations/invalidator_storage.cc |
| index b17ba509c05dab8b56cdb69c04799b4ee0e2fc6c..e3f70fd2456f689280f85d2e305051a2f353435f 100644 |
| --- a/chrome/browser/sync/invalidations/invalidator_storage.cc |
| +++ b/chrome/browser/sync/invalidations/invalidator_storage.cc |
| @@ -104,6 +104,9 @@ InvalidatorStorage::InvalidatorStorage(PrefServiceSyncable* pref_service) |
| pref_service_->RegisterStringPref(prefs::kInvalidatorInvalidationState, |
| std::string(), |
| PrefServiceSyncable::UNSYNCABLE_PREF); |
| + pref_service_->RegisterStringPref(prefs::kInvalidatorInvalidatorClientId, |
| + std::string(), |
| + PrefServiceSyncable::UNSYNCABLE_PREF); |
| MigrateMaxInvalidationVersionsPref(); |
| } |
| @@ -256,6 +259,16 @@ void InvalidatorStorage::DeserializeMap( |
| } |
| } |
| +void InvalidatorStorage::SetInvalidatorClientId(const std::string& client_id) { |
| + DCHECK(thread_checker_.CalledOnValidThread()); |
| + pref_service_->SetString(prefs::kInvalidatorInvalidatorClientId, client_id); |
| +} |
| + |
| +std::string InvalidatorStorage::GetInvalidatorClientId() const { |
| + return pref_service_ ? |
| + pref_service_->GetString(prefs::kInvalidatorInvalidatorClientId) : ""; |
|
tim (not reviewing)
2013/02/05 20:04:33
nit - prefer std::string() to ""
rlarocque
2013/02/05 21:36:56
Done.
|
| +} |
| + |
| void InvalidatorStorage::SetBootstrapData(const std::string& data) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| std::string base64_data; |
| @@ -275,6 +288,7 @@ std::string InvalidatorStorage::GetBootstrapData() const { |
| void InvalidatorStorage::Clear() { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| pref_service_->ClearPref(prefs::kInvalidatorMaxInvalidationVersions); |
| + pref_service_->ClearPref(prefs::kInvalidatorInvalidatorClientId); |
| pref_service_->ClearPref(prefs::kInvalidatorInvalidationState); |
| } |