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

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

Issue 11961030: [Sync] Make SESSIONS an implicit type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_harness.cc
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 6e74f580310251da59997c8702f54b2d4b528932..7adda650ac487e64cc3883b8d921d426dc43452f 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -32,6 +32,8 @@
using syncer::sessions::SyncSessionSnapshot;
+namespace {
+
// TODO(rsimha): Remove the following lines once crbug.com/91863 is fixed.
// The amount of time for which we wait for a live sync operation to complete.
static const int kLiveSyncOperationTimeoutMs = 45000;
@@ -39,6 +41,20 @@ static const int kLiveSyncOperationTimeoutMs = 45000;
// The amount of time we wait for test cases that verify exponential backoff.
static const int kExponentialBackoffVerificationTimeoutMs = 60000;
+syncer::ModelTypeSet GetUserVisibleTypes() {
+ syncer::ModelTypeSet user_visible_types(syncer::UserTypes());
+ user_visible_types.Remove(syncer::APP_NOTIFICATIONS);
+ user_visible_types.Remove(syncer::APP_SETTINGS);
+ user_visible_types.Remove(syncer::AUTOFILL_PROFILE);
+ user_visible_types.Remove(syncer::EXTENSION_SETTINGS);
+ user_visible_types.Remove(syncer::SEARCH_ENGINES);
+ user_visible_types.Remove(syncer::SESSIONS);
+ user_visible_types.Remove(syncer::HISTORY_DELETE_DIRECTIVES);
+ return user_visible_types;
+}
+
+}
+
// Simple class to implement a timeout using PostDelayedTask. If it is not
// aborted before picked up by a message queue, then it asserts with the message
// provided. This class is not thread safe.
@@ -962,6 +978,7 @@ bool ProfileSyncServiceHarness::DisableSyncForDatatype(
return true;
}
+ synced_datatypes.RetainAll(GetUserVisibleTypes());
synced_datatypes.Remove(datatype);
service()->OnUserChoseDatatypes(false, synced_datatypes);
if (AwaitFullSyncCompletion("Datatype reconfiguration.")) {
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698