| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "chrome/browser/extensions/stateful_external_extension_provider.h" | |
| 10 | |
| 11 // A specialization of the ExternalExtensionProvider that uses a json file to | |
| 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. | |
| 15 class ExternalPrefExtensionProvider : public StatefulExternalExtensionProvider { | |
| 16 public: | |
| 17 explicit ExternalPrefExtensionProvider(); | |
| 18 virtual ~ExternalPrefExtensionProvider(); | |
| 19 | |
| 20 // Used only during testing to not use the json file for external extensions, | |
| 21 // but instead parse a json file specified by the test. | |
| 22 void SetPreferencesForTesting(const std::string& json_data_for_testing); | |
| 23 | |
| 24 private: | |
| 25 void SetPreferences(ValueSerializer* serializer); | |
| 26 }; | |
| 27 | |
| 28 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_PREF_EXTENSION_PROVIDER_H_ | |
| OLD | NEW |