Index: chrome/browser/sync/sync_prefs.cc |
diff --git a/chrome/browser/sync/sync_prefs.cc b/chrome/browser/sync/sync_prefs.cc |
index 9d8e34915f1825805691f437a3917983f829a1ba..1eaf3694785ea2cb114eddf6e4c380f6112530e5 100644 |
--- a/chrome/browser/sync/sync_prefs.cc |
+++ b/chrome/browser/sync/sync_prefs.cc |
@@ -94,6 +94,10 @@ void SyncPrefs::RegisterUserPrefs(PrefRegistrySyncable* registry) { |
PrefRegistrySyncable::UNSYNCABLE_PREF); |
#endif |
+ registry->RegisterStringPref(prefs::kSyncSessionsGUID, |
+ "", |
+ PrefRegistrySyncable::UNSYNCABLE_PREF); |
+ |
// We will start prompting people about new data types after the launch of |
// SESSIONS - all previously launched data types are treated as if they are |
// already acknowledged. |
@@ -281,6 +285,18 @@ void SyncPrefs::SetKeystoreEncryptionBootstrapToken(const std::string& token) { |
pref_service_->SetString(prefs::kSyncKeystoreEncryptionBootstrapToken, token); |
} |
+std::string SyncPrefs::GetSyncSessionsGUID() const { |
+ DCHECK(CalledOnValidThread()); |
+ return |
+ pref_service_ ? |
+ pref_service_->GetString(prefs::kSyncSessionsGUID) : ""; |
+} |
+ |
+void SyncPrefs::SetSyncSessionsGUID(const std::string& guid) { |
+ DCHECK(CalledOnValidThread()); |
+ pref_service_->SetString(prefs::kSyncSessionsGUID, guid); |
+} |
+ |
// static |
const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) { |
switch (data_type) { |