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

Unified Diff: sync/internal_api/sync_manager.cc

Issue 10235013: [Sync] Add support for automatic enabling of syncing tab favicons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert testserver for now Created 8 years, 8 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 | « sync/internal_api/sync_manager.h ('k') | sync/protocol/nigori_specifics.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager.cc
diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc
index d7d8c8afdde2054bd3d35c92edb6bf635fe75805..f33fefa442a4509fa560798f40db1bf469ba92e6 100644
--- a/sync/internal_api/sync_manager.cc
+++ b/sync/internal_api/sync_manager.cc
@@ -52,6 +52,7 @@
#include "sync/syncable/model_type_payload_map.h"
#include "sync/syncable/syncable.h"
#include "sync/util/cryptographer.h"
+#include "sync/util/experiments.h"
#include "sync/util/get_session_name.h"
#include "sync/util/time.h"
@@ -2478,7 +2479,7 @@ syncable::ModelTypeSet SyncManager::GetEncryptedDataTypesForTest() const {
return GetEncryptedTypes(&trans);
}
-bool SyncManager::ReceivedExperimentalTypes(syncable::ModelTypeSet* to_add)
+bool SyncManager::ReceivedExperiment(browser_sync::Experiments* experiments)
const {
ReadTransaction trans(FROM_HERE, GetUserShare());
ReadNode node(&trans);
@@ -2486,11 +2487,16 @@ bool SyncManager::ReceivedExperimentalTypes(syncable::ModelTypeSet* to_add)
DVLOG(1) << "Couldn't find Nigori node.";
return false;
}
+ bool found_experiment = false;
if (node.GetNigoriSpecifics().sync_tabs()) {
- to_add->Put(syncable::SESSIONS);
- return true;
+ experiments->sync_tabs = true;
+ found_experiment = true;
+ }
+ if (node.GetNigoriSpecifics().sync_tab_favicons()) {
+ experiments->sync_tab_favicons = true;
+ found_experiment = true;
}
- return false;
+ return found_experiment;
}
bool SyncManager::HasUnsyncedItems() const {
« no previous file with comments | « sync/internal_api/sync_manager.h ('k') | sync/protocol/nigori_specifics.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698