shill: replace StoreFactory with a simpler CreateStore function
StoreFactory was used to create either KeyFileStore or JsonStore. The
use of KeyFileStore or JsonStore is mutually exclusive and decided at
the build time. StoreFactory needed to be a singleton to keep a Glib
member, but that's no longer the case since the removal of Glib. This CL
simplifies the code by replacing StoreFactory with a simpler CreateStore
function, which can be provided by either key_file_store.cc or
json_store.cc, but not both (which is ensured at the build time).
BUG=None
TEST=Run unit tests under USE=json_store and USE=-json_store.
Change-Id: I3b7e5cfb9deacb9b81bb9b4945c453ac9c24d915
Reviewed-on: https://chromium-review.googlesource.com/479796
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
12 files changed