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

Unified Diff: chrome/browser/sync/internal_api/sync_manager.cc

Issue 7669073: [Sync] Add support for enabling session sync remotely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DOUBLE R..ebase Created 9 years, 4 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/internal_api/sync_manager.h ('k') | chrome/browser/sync/profile_sync_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/internal_api/sync_manager.cc
diff --git a/chrome/browser/sync/internal_api/sync_manager.cc b/chrome/browser/sync/internal_api/sync_manager.cc
index c0b9cb35ff7e9c075139b36b90fff849a036970b..dea6522a7e7d335ae5fba1c6e900e794eb6764ef 100644
--- a/chrome/browser/sync/internal_api/sync_manager.cc
+++ b/chrome/browser/sync/internal_api/sync_manager.cc
@@ -1968,10 +1968,25 @@ void SyncManager::RefreshEncryption() {
}
syncable::ModelTypeSet SyncManager::GetEncryptedDataTypes() const {
- sync_api::ReadTransaction trans(FROM_HERE, GetUserShare());
+ ReadTransaction trans(FROM_HERE, GetUserShare());
return GetEncryptedTypes(&trans);
}
+bool SyncManager::ReceivedExperimentalTypes(syncable::ModelTypeSet* to_add)
+ const {
+ ReadTransaction trans(FROM_HERE, GetUserShare());
+ ReadNode node(&trans);
+ if (!node.InitByTagLookup(kNigoriTag)) {
+ VLOG(1) << "Couldn't find Nigori node.";
+ return false;
+ }
+ if (node.GetNigoriSpecifics().sync_tabs()) {
+ to_add->insert(syncable::SESSIONS);
+ return true;
+ }
+ return false;
+}
+
bool SyncManager::HasUnsyncedItems() const {
sync_api::ReadTransaction trans(FROM_HERE, GetUserShare());
return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0);
« no previous file with comments | « chrome/browser/sync/internal_api/sync_manager.h ('k') | chrome/browser/sync/profile_sync_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698