commit | 04147470fdeaaf9ab7588bd3a7988d74aa990068 | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@chromium.org> | Tue Aug 18 13:25:28 2015 -0700 |
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | Thu Aug 20 21:57:04 2015 +0000 |
tree | b9019439728370e4dc013f93d73d154be9d6abb6 | |
parent | bb813e8d12d762ff9fb2d092776805f973c7bab4 [diff] |
shill: abstract the instantiation of store interfaces When creating a persistent store, most code in shill shouldn't have to worry or care about what the storage backend is. To achieve this, add a StoreFactory, and migrate existing code to use it. The StoreFactory selects which store interface backend to use statically (i.e. at compile time). To facilitate the migration, we move some methods from StoreInterface implementations, up into the interface. Note that unit tests continue to use KeyFileStore directly for now. We'll migrate unit tests in a later CL. BUG=b:23223416 TEST="FEATURES=test emerge-samus shill" TEST="USE=json_store emerge-samus shill" [1] [1] We deliberately leave out FEATURES=test, because some unit tests require KeyFileStore. Change-Id: I7e72d79ebc75e63e7fb57e9a96352fea7b31a818 Reviewed-on: https://chromium-review.googlesource.com/294274 Trybot-Ready: mukesh agrawal <quiche@chromium.org> Tested-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: mukesh agrawal <quiche@chromium.org>