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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/win/registry.h" |
10 #include "chrome/browser/extensions/external_loader.h" | 11 #include "chrome/browser/extensions/external_loader.h" |
11 | 12 |
12 namespace extensions { | 13 namespace extensions { |
13 | 14 |
14 class ExternalRegistryLoader : public ExternalLoader { | 15 class ExternalRegistryLoader : public ExternalLoader { |
15 public: | 16 public: |
16 ExternalRegistryLoader() {} | 17 ExternalRegistryLoader() {} |
17 | 18 |
18 protected: | 19 protected: |
19 void StartLoading() override; | 20 void StartLoading() override; |
20 | 21 |
21 private: | 22 private: |
22 friend class base::RefCountedThreadSafe<ExternalLoader>; | 23 friend class base::RefCountedThreadSafe<ExternalLoader>; |
23 | 24 |
24 ~ExternalRegistryLoader() override {} | 25 ~ExternalRegistryLoader() override {} |
25 | 26 |
| 27 scoped_ptr<base::DictionaryValue> LoadPrefsOnFileThread(); |
26 void LoadOnFileThread(); | 28 void LoadOnFileThread(); |
| 29 void CompleteLoadAndStartWatchingRegistry(); |
| 30 void UpdatePrefsOnFileThread(); |
| 31 void OnRegistryKeyChanged(base::win::RegKey* key); |
| 32 |
| 33 base::win::RegKey hklm_key_; |
| 34 base::win::RegKey hkcu_key_; |
27 | 35 |
28 DISALLOW_COPY_AND_ASSIGN(ExternalRegistryLoader); | 36 DISALLOW_COPY_AND_ASSIGN(ExternalRegistryLoader); |
29 }; | 37 }; |
30 | 38 |
31 } // namespace extensions | 39 } // namespace extensions |
32 | 40 |
33 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ | 41 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_REGISTRY_LOADER_WIN_H_ |
OLD | NEW |