| 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_POLICY_EXTENSION_PROVIDER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "chrome/browser/extensions/stateful_external_extension_provider.h" | |
| 10 | |
| 11 class ListValue; | |
| 12 class MockExternalPolicyExtensionProviderVisitor; | |
| 13 class PrefService; | |
| 14 | |
| 15 // A specialization of the ExternalExtensionProvider that uses | |
| 16 // prefs::kExtensionInstallForceList to look up which external extensions are | |
| 17 // registered. The value of this preference is received via the constructor and | |
| 18 // via |SetPreferences| in case of run-time updates. | |
| 19 // Instances of this class are expected to be created and destroyed on the UI | |
| 20 // thread and they are expecting public method calls from the FILE thread. | |
| 21 class ExternalPolicyExtensionProvider | |
| 22 : public StatefulExternalExtensionProvider { | |
| 23 public: | |
| 24 explicit ExternalPolicyExtensionProvider(const ListValue* forcelist); | |
| 25 virtual ~ExternalPolicyExtensionProvider(); | |
| 26 | |
| 27 // Set the internal list of extensions based on |forcelist|. | |
| 28 // Does not take ownership of |forcelist|. | |
| 29 void SetPreferences(const ListValue* forcelist); | |
| 30 | |
| 31 private: | |
| 32 friend class MockExternalPolicyExtensionProviderVisitor; | |
| 33 | |
| 34 // Set the internal list of extensions based on |forcelist|. | |
| 35 // Does not take ownership of |forcelist|. | |
| 36 void ProcessPreferences(const ListValue* forcelist); | |
| 37 }; | |
| 38 | |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ | |
| OLD | NEW |