mukesh agrawal | 0414747 | 2015-08-18 13:25:28 -0700 | [diff] [blame] | 1 | // 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 agrawal | 78e0584 | 2015-08-27 11:29:19 -0700 | [diff] [blame] | 10 | namespace base { |
| 11 | class FilePath; |
| 12 | } |
| 13 | |
mukesh agrawal | 0414747 | 2015-08-18 13:25:28 -0700 | [diff] [blame] | 14 | namespace shill { |
| 15 | |
mukesh agrawal | 0414747 | 2015-08-18 13:25:28 -0700 | [diff] [blame] | 16 | class StoreInterface; |
| 17 | |
| 18 | class StoreFactory { |
| 19 | public: |
| 20 | // This is a singleton. Use StoreFactory::GetInstance()->Foo(). |
| 21 | static StoreFactory* GetInstance(); |
| 22 | |
mukesh agrawal | 78e0584 | 2015-08-27 11:29:19 -0700 | [diff] [blame] | 23 | StoreInterface* CreateStore(const base::FilePath& path); |
mukesh agrawal | 0414747 | 2015-08-18 13:25:28 -0700 | [diff] [blame] | 24 | |
| 25 | protected: |
| 26 | StoreFactory(); |
| 27 | |
| 28 | private: |
| 29 | friend struct base::DefaultLazyInstanceTraits<StoreFactory>; |
mukesh agrawal | 0414747 | 2015-08-18 13:25:28 -0700 | [diff] [blame] | 30 | |
| 31 | DISALLOW_COPY_AND_ASSIGN(StoreFactory); |
| 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_STORE_FACTORY_H_ |