Add tables for sync metadata to the history db and add methods for read/write/delete this data.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98 commit e8cbd06453b8b4dfc01fa61d004fa0469f42bd98 Author: gangwu <gangwu@chromium.org> Date: Mon Mar 20 23:24:43 2017 [sync] Add typed url sync metadata to the history db Two tables of sync metadata, are now being added to the history database. These two types are the per-entry EntityMetadata and the ModelTypeState, which is global state for the typed url model type. This change adds a migration to add the tables, and a new class TypedURLSyncMetadataDatabase wich would read/write/delete metadatas, with associated tests. Also a key word "AUTOINCREMENT" is added into urls table's column 'id' which is primary key. AUTOINCREMENT can avoid to reuse id number when an url got deleted and then recycled. BUG= 696701 Review-Url: https://codereview.chromium.org/2721713002 Cr-Commit-Position: refs/heads/master@{#458232} [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/BUILD.gn [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/history_database.cc [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/history_database.h [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/in_memory_database.cc [add] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/typed_url_sync_metadata_database.cc [add] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/typed_url_sync_metadata_database.h [add] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/typed_url_sync_metadata_database_unittest.cc [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/url_database.cc [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/url_database.h [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/history/core/browser/url_database_unittest.cc [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/test/data/omnibox/in_memory_url_index_test.db.txt [modify] https://crrev.com/e8cbd06453b8b4dfc01fa61d004fa0469f42bd98/components/test/data/omnibox/in_memory_url_index_test_limited.db.txt
Comment 1 by gangwu@chromium.org
, Feb 27 2017