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

Side by Side Diff: chrome/browser/sync/test/integration/migration_test.cc

Issue 2365763002: [Sync] Removed passphrase helper methods, removed ((n)) pattern, and fixed lint violations. (Closed)
Patch Set: Removed useless pass-through accessors. Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 9 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
10 #include "chrome/browser/sync/test/integration/migration_waiter.h" 10 #include "chrome/browser/sync/test/integration/migration_waiter.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 for (int i = 0; i < num_clients(); ++i) { 84 for (int i = 0; i < num_clients(); ++i) {
85 MigrationWatcher* watcher = new MigrationWatcher(GetClient(i)); 85 MigrationWatcher* watcher = new MigrationWatcher(GetClient(i));
86 migration_watchers_.push_back(watcher); 86 migration_watchers_.push_back(watcher);
87 } 87 }
88 return true; 88 return true;
89 } 89 }
90 90
91 syncer::ModelTypeSet GetPreferredDataTypes() { 91 syncer::ModelTypeSet GetPreferredDataTypes() {
92 // ProfileSyncService must already have been created before we can call 92 // ProfileSyncService must already have been created before we can call
93 // GetPreferredDataTypes(). 93 // GetPreferredDataTypes().
94 DCHECK(GetSyncService((0))); 94 DCHECK(GetSyncService(0));
95 syncer::ModelTypeSet preferred_data_types = 95 syncer::ModelTypeSet preferred_data_types =
96 GetSyncService((0))->GetPreferredDataTypes(); 96 GetSyncService(0)->GetPreferredDataTypes();
97 preferred_data_types.RemoveAll(syncer::ProxyTypes()); 97 preferred_data_types.RemoveAll(syncer::ProxyTypes());
98 98
99 // Supervised user data types will be "unready" during this test, so we 99 // Supervised user data types will be "unready" during this test, so we
100 // should not request that they be migrated. 100 // should not request that they be migrated.
101 preferred_data_types.Remove(syncer::SUPERVISED_USER_SETTINGS); 101 preferred_data_types.Remove(syncer::SUPERVISED_USER_SETTINGS);
102 preferred_data_types.Remove(syncer::SUPERVISED_USER_WHITELISTS); 102 preferred_data_types.Remove(syncer::SUPERVISED_USER_WHITELISTS);
103 103
104 // Autofill wallet will be unready during this test, so we should not 104 // Autofill wallet will be unready during this test, so we should not
105 // request that it be migrated. 105 // request that it be migrated.
106 preferred_data_types.Remove(syncer::AUTOFILL_WALLET_DATA); 106 preferred_data_types.Remove(syncer::AUTOFILL_WALLET_DATA);
107 preferred_data_types.Remove(syncer::AUTOFILL_WALLET_METADATA); 107 preferred_data_types.Remove(syncer::AUTOFILL_WALLET_METADATA);
108 108
109 // Arc package will be unready during this test, so we should not request 109 // Arc package will be unready during this test, so we should not request
110 // that it be migrated. 110 // that it be migrated.
111 preferred_data_types.Remove(syncer::ARC_PACKAGE); 111 preferred_data_types.Remove(syncer::ARC_PACKAGE);
112 112
113 // Make sure all clients have the same preferred data types. 113 // Make sure all clients have the same preferred data types.
114 for (int i = 1; i < num_clients(); ++i) { 114 for (int i = 1; i < num_clients(); ++i) {
115 const syncer::ModelTypeSet other_preferred_data_types = 115 const syncer::ModelTypeSet other_preferred_data_types =
116 GetSyncService((i))->GetPreferredDataTypes(); 116 GetSyncService(i)->GetPreferredDataTypes();
117 EXPECT_EQ(other_preferred_data_types, preferred_data_types); 117 EXPECT_EQ(other_preferred_data_types, preferred_data_types);
118 } 118 }
119 return preferred_data_types; 119 return preferred_data_types;
120 } 120 }
121 121
122 // Returns a MigrationList with every enabled data type in its own 122 // Returns a MigrationList with every enabled data type in its own
123 // set. 123 // set.
124 MigrationList GetPreferredDataTypesList() { 124 MigrationList GetPreferredDataTypesList() {
125 MigrationList migration_list; 125 MigrationList migration_list;
126 const syncer::ModelTypeSet preferred_data_types = 126 const syncer::ModelTypeSet preferred_data_types =
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Do not add optional datatypes. 427 // Do not add optional datatypes.
428 } 428 }
429 429
430 ~MigrationReconfigureTest() override {} 430 ~MigrationReconfigureTest() override {}
431 431
432 private: 432 private:
433 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest); 433 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest);
434 }; 434 };
435 435
436 } // namespace 436 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/test/integration/password_manager_setting_migrator_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698