blob: d5c2df2c1a32a85e4bbeff307dd3bf3fe20f63e5 [file] [log] [blame]
mukesh agrawal04147472015-08-18 13:25:28 -07001// Copyright 2015 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_STORE_FACTORY_H_
6#define SHILL_STORE_FACTORY_H_
7
8#include <base/lazy_instance.h>
9
mukesh agrawal78e05842015-08-27 11:29:19 -070010namespace base {
11class FilePath;
12}
13
mukesh agrawal04147472015-08-18 13:25:28 -070014namespace shill {
15
mukesh agrawal04147472015-08-18 13:25:28 -070016class StoreInterface;
17
18class StoreFactory {
19 public:
20 // This is a singleton. Use StoreFactory::GetInstance()->Foo().
21 static StoreFactory* GetInstance();
22
mukesh agrawal78e05842015-08-27 11:29:19 -070023 StoreInterface* CreateStore(const base::FilePath& path);
mukesh agrawal04147472015-08-18 13:25:28 -070024
25 protected:
26 StoreFactory();
27
28 private:
29 friend struct base::DefaultLazyInstanceTraits<StoreFactory>;
mukesh agrawal04147472015-08-18 13:25:28 -070030
31 DISALLOW_COPY_AND_ASSIGN(StoreFactory);
32};
33
34} // namespace shill
35
36#endif // SHILL_STORE_FACTORY_H_