Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7257)

Unified Diff: chrome/browser/sync/sync_prefs.cc

Issue 12313075: [sync] Upstream the Android ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sync_prefs.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/sync/sync_prefs.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698