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

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

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 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
Index: chrome/browser/sync/test_profile_sync_service.cc
diff --git a/chrome/browser/sync/test_profile_sync_service.cc b/chrome/browser/sync/test_profile_sync_service.cc
index f6528e7c75ffaa75bdff9812fcbdcfcdcbaa1447..34e70012d8fd2de1d914d232ef627f4bd19faaf5 100644
--- a/chrome/browser/sync/test_profile_sync_service.cc
+++ b/chrome/browser/sync/test_profile_sync_service.cc
@@ -24,6 +24,9 @@ using syncer::sessions::SyncSessionSnapshot;
using syncer::sessions::SyncSourceInfo;
using syncer::UserShare;
using syncer::syncable::Directory;
+using syncer::NIGORI;
+using syncer::PER_DEVICE_METADATA;
+using syncer::PER_USER_METADATA;
namespace browser_sync {
@@ -113,14 +116,24 @@ void SyncBackendHostForProfileSyncTest
UserShare* user_share = GetUserShare();
Directory* directory = user_share->directory.get();
- if (!directory->initial_sync_ended_for_type(syncer::NIGORI)) {
+ if (!directory->initial_sync_ended_for_type(NIGORI)) {
ProfileSyncServiceTestHelper::CreateRoot(
- syncer::NIGORI, user_share, &id_factory_);
+ NIGORI, user_share, &id_factory_);
// A side effect of adding the NIGORI mode (normally done by the
// syncer) is a decryption attempt, which will fail the first time.
}
+ if (!directory->initial_sync_ended_for_type(PER_DEVICE_METADATA)) {
rlarocque 2012/08/11 01:31:52 These if statements are probably not required...
+ ProfileSyncServiceTestHelper::CreateRoot(
+ PER_DEVICE_METADATA, user_share, &id_factory_);
+ }
+
+ if (!directory->initial_sync_ended_for_type(PER_USER_METADATA)) {
+ ProfileSyncServiceTestHelper::CreateRoot(
+ PER_USER_METADATA, user_share, &id_factory_);
+ }
+
SetInitialSyncEndedForAllTypes();
restored_types = syncer::ModelTypeSet::All();
}

Powered by Google App Engine
This is Rietveld 408576698