diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 18:57:33 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 18:57:33 +0000 |
commit | a50242b42d63fbbacd57b1f0c6db7d8601509d71 (patch) | |
tree | 19e47d7c84281be560c539157db2831c4d45ae02 /chrome/browser/sync/syncable/syncable-inl.h | |
parent | 1833194fba18a78d3824fcb729e03ad464ab6a58 (diff) | |
download | chromium_src-a50242b42d63fbbacd57b1f0c6db7d8601509d71.zip chromium_src-a50242b42d63fbbacd57b1f0c6db7d8601509d71.tar.gz chromium_src-a50242b42d63fbbacd57b1f0c6db7d8601509d71.tar.bz2 |
In the syncable directory, an index consists of (a) a rule defining which syncable Entries are included in the index and (b) a comparator defining the ordering used by the index set.
This change introduces "Indexer" traits types that are tuples of (a) and (b). I then am able to use some templated code to add a ScopedIndexUpdater, which is shorthand for the formerly manual pattern where we'd remove items from indices before updating the indexed fields.
I'm doing this in preparation for changing the ParentChildIndex to depend on SERVER_POSITION_IN_PARENT.
BUG=60236, chromium-os:11226
TEST=sync_unit_tests
Review URL: http://codereview.chromium.org/6542072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/syncable/syncable-inl.h')
-rw-r--r-- | chrome/browser/sync/syncable/syncable-inl.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/chrome/browser/sync/syncable/syncable-inl.h b/chrome/browser/sync/syncable/syncable-inl.h index 79845cf..c5beed9 100644 --- a/chrome/browser/sync/syncable/syncable-inl.h +++ b/chrome/browser/sync/syncable/syncable-inl.h @@ -6,8 +6,6 @@ #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_INL_H_ #pragma once -#include "chrome/common/sqlite_utils.h" - namespace syncable { template <typename FieldType, FieldType field_index> @@ -19,13 +17,6 @@ class LessField { } }; -struct IdRowTraits { - typedef syncable::Id RowType; - void Extract(SQLStatement* statement, syncable::Id* id) const { - id->s_ = statement->column_string(0); - } -}; - } // namespace syncable #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_INL_H_ |