OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ |
6 #define CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ | 6 #define CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 | 13 |
14 namespace i18n { | 14 namespace i18n { |
15 namespace addressinput { | 15 namespace addressinput { |
16 class Storage; | 16 class Storage; |
17 } | 17 } |
18 } | 18 } |
19 | 19 |
20 class JsonPrefStore; | 20 class JsonPrefStore; |
21 class PersistentPrefStore; | |
22 | 21 |
23 namespace autofill { | 22 namespace autofill { |
24 | 23 |
25 // Creates Storage objects, all of which are backed by a common pref store. | 24 // Creates Storage objects, all of which are backed by a common pref store. |
26 class ValidationRulesStorageFactory { | 25 class ValidationRulesStorageFactory { |
27 public: | 26 public: |
28 static std::unique_ptr<::i18n::addressinput::Storage> CreateStorage(); | 27 static std::unique_ptr<::i18n::addressinput::Storage> CreateStorage(); |
29 | 28 |
30 private: | 29 private: |
31 friend struct base::DefaultLazyInstanceTraits<ValidationRulesStorageFactory>; | 30 friend struct base::DefaultLazyInstanceTraits<ValidationRulesStorageFactory>; |
32 | 31 |
33 ValidationRulesStorageFactory(); | 32 ValidationRulesStorageFactory(); |
34 ~ValidationRulesStorageFactory(); | 33 ~ValidationRulesStorageFactory(); |
35 | 34 |
36 scoped_refptr<JsonPrefStore> json_pref_store_; | 35 scoped_refptr<JsonPrefStore> json_pref_store_; |
37 | 36 |
38 DISALLOW_COPY_AND_ASSIGN(ValidationRulesStorageFactory); | 37 DISALLOW_COPY_AND_ASSIGN(ValidationRulesStorageFactory); |
39 }; | 38 }; |
40 | 39 |
41 } // namespace autofill | 40 } // namespace autofill |
42 | 41 |
43 #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ | 42 #endif // CHROME_BROWSER_AUTOFILL_VALIDATION_RULES_STORAGE_FACTORY_H_ |
OLD | NEW |