OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A utility class for accessing and caching registry preferences that take | 5 // A utility class for accessing and caching registry preferences that take |
6 // the form of lists of strings. | 6 // the form of lists of strings. |
7 // TODO(robertshield): Use the RegistryWatcher stuff to keep this list up to | 7 // TODO(robertshield): Use the RegistryWatcher stuff to keep this list up to |
8 // date. | 8 // date. |
9 | 9 |
10 #ifndef CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ | 10 #ifndef CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ |
11 #define CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ | 11 #define CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ |
12 | 12 |
13 #include <windows.h> | 13 #include <windows.h> |
14 | 14 |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/string16.h" | 17 #include "base/strings/string16.h" |
18 | 18 |
19 class RegistryListPreferencesHolder { | 19 class RegistryListPreferencesHolder { |
20 public: | 20 public: |
21 RegistryListPreferencesHolder(); | 21 RegistryListPreferencesHolder(); |
22 | 22 |
23 // Initializes the RegistryListPreferencesHolder using the values stored | 23 // Initializes the RegistryListPreferencesHolder using the values stored |
24 // under the key |list_name| stored at |registry_path| under |hive|. | 24 // under the key |list_name| stored at |registry_path| under |hive|. |
25 void Init(HKEY hive, | 25 void Init(HKEY hive, |
26 const wchar_t* registry_path, | 26 const wchar_t* registry_path, |
27 const wchar_t* list_name); | 27 const wchar_t* list_name); |
(...skipping 13 matching lines...) Expand all Loading... |
41 void ResetForTesting(); | 41 void ResetForTesting(); |
42 | 42 |
43 private: | 43 private: |
44 std::vector<string16> values_; | 44 std::vector<string16> values_; |
45 bool valid_; | 45 bool valid_; |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(RegistryListPreferencesHolder); | 47 DISALLOW_COPY_AND_ASSIGN(RegistryListPreferencesHolder); |
48 }; | 48 }; |
49 | 49 |
50 #endif // CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ | 50 #endif // CHROME_FRAME_REGISTRY_LIST_PREFERENCES_HOLDER_H_ |
OLD | NEW |