OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_PREF_EXTENSION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/extensions/stateful_external_extension_provider.h" | 9 #include "chrome/browser/extensions/stateful_external_extension_provider.h" |
10 | 10 |
11 // A specialization of the ExternalExtensionProvider that uses a json file to | 11 // A specialization of the ExternalExtensionProvider that uses a json file to |
12 // look up which external extensions are registered. | 12 // look up which external extensions are registered. |
| 13 // Instances of this class are expected to be created and destroyed on the UI |
| 14 // thread and they are expecting public method calls from the FILE thread. |
13 class ExternalPrefExtensionProvider : public StatefulExternalExtensionProvider { | 15 class ExternalPrefExtensionProvider : public StatefulExternalExtensionProvider { |
14 public: | 16 public: |
15 explicit ExternalPrefExtensionProvider(); | 17 explicit ExternalPrefExtensionProvider(); |
16 virtual ~ExternalPrefExtensionProvider(); | 18 virtual ~ExternalPrefExtensionProvider(); |
17 | 19 |
18 // Used only during testing to not use the json file for external extensions, | 20 // Used only during testing to not use the json file for external extensions, |
19 // but instead parse a json file specified by the test. | 21 // but instead parse a json file specified by the test. |
20 void SetPreferencesForTesting(const std::string& json_data_for_testing); | 22 void SetPreferencesForTesting(const std::string& json_data_for_testing); |
21 | 23 |
22 private: | 24 private: |
23 void SetPreferences(ValueSerializer* serializer); | 25 void SetPreferences(ValueSerializer* serializer); |
24 }; | 26 }; |
25 | 27 |
26 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ | 28 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ |
OLD | NEW |