1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_AUTOFILL_MIGRATION_H_ 6 #define CHROME_BROWSER_SYNC_SYNCABLE_AUTOFILL_MIGRATION_H_ 7 #pragma once 8 9 namespace syncable { 10 enum AutofillMigrationState { 11 12 // Indicates the default state. After first run the state would change to 13 // one of the following. 14 NOT_DETERMINED, 15 16 // The autofill profile is not migrated. Current sync should migrate the data 17 // by syncing down the old autofill and syncing profiles back up to the server 18 // as new autofill. 19 NOT_MIGRATED, 20 21 // We have migrated the autofill profile data. From now on autofill and 22 // autofill profiles are 2 seperate data types. 23 MIGRATED, 24 25 // The autofill datatype is being synced new.(either because this is a new 26 // client or the user just enabled them for syncing). In which case if 27 // someother client had migrated the data already then our new state after 28 // first sync would be MIGRATED. Else we would be responsible for migrating 29 // the data. 30 INSUFFICIENT_INFO_TO_DETERMINE 31 }; 32 33 struct AutofillMigrationDebugInfo { 34 enum PropertyToSet { 35 MIGRATION_TIME, 36 ENTRIES_ADDED, 37 PROFILES_ADDED 38 }; 39 int64 autofill_migration_time; 40 // NOTE(akalin): We don't increment 41 // |bookmarks_added_during_migration| anymore, although it's not 42 // worth the effort to remove it from the code. Eventually, this 43 // will go away once we remove all the autofill migration code. 44 int bookmarks_added_during_migration; 45 int autofill_entries_added_during_migration; 46 int autofill_profile_added_during_migration; 47 }; 48 49 } // namespace syncable 50 51 #endif // CHROME_BROWSER_SYNC_SYNCABLE_AUTOFILL_MIGRATION_H_ 52 53