-
Troy Hildebrandt authored
Currently, ProtoDatabase<T> only allows us to have a LevelDB that stores a single proto type. In preparation for a single unified proto DB, ProtoDatabase and ProtoDatabaseImpl have been refactored. Much of ProtoDatabaseImpl's logic has been moved into ProtoLevelDBWrapper, which contains template functions instead of being a template class. ProtoDatabase<T> provides the interface we have today, and we now have a UniqueProtoDatabase<T> as a thin layer above ProtoDatabase so that it can manage the unique_ptr to its own LevelDB. ProtoDatabaseImpl<T> is kept around as an alias for UniqueProtoDatabase for compatibility, and as a result no ProtoDatabase(Impl) users are negatively impacted by this change. The addition of the ProtoLevelDBWrapper provides a convenient place to record metrics for the various database clients. Bug: 870813 Change-Id: I6175a3cbea5dd312f09c1d88d5ad80f1f4b26006 Reviewed-on: https://chromium-review.googlesource.com/c/1170093 Commit-Queue: Troy Hildebrandt <thildebr@chromium.org> Reviewed-by:
Tommy Nyquist <nyquist@chromium.org> Reviewed-by:
David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#598782}
c7f0b95d