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_POLICY_EXTENSION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_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 class ListValue; | 11 class ListValue; |
12 class MockExternalPolicyExtensionProviderVisitor; | 12 class MockExternalPolicyExtensionProviderVisitor; |
13 class PrefService; | 13 class PrefService; |
14 | 14 |
15 // A specialization of the ExternalExtensionProvider that uses | 15 // A specialization of the ExternalExtensionProvider that uses |
16 // prefs::kExtensionInstallForceList to look up which external extensions are | 16 // prefs::kExtensionInstallForceList to look up which external extensions are |
17 // registered. | 17 // registered. The value of this preference is set via the constructor and |
18 // via |SetPreferences| in case of run-time updates. | |
jochen (gone - plz use gerrit)
2010/12/15 08:57:49
please add a comment that the object must be creat
gfeher
2010/12/15 13:44:58
Done.
| |
18 class ExternalPolicyExtensionProvider | 19 class ExternalPolicyExtensionProvider |
19 : public StatefulExternalExtensionProvider { | 20 : public StatefulExternalExtensionProvider { |
20 public: | 21 public: |
21 explicit ExternalPolicyExtensionProvider(); | 22 explicit ExternalPolicyExtensionProvider(const ListValue* forcelist); |
22 virtual ~ExternalPolicyExtensionProvider(); | 23 virtual ~ExternalPolicyExtensionProvider(); |
23 | 24 |
24 // Set the internal list of extensions based on |forcelist|. | 25 // Set the internal list of extensions based on |forcelist|. |
25 // Does not take ownership of |forcelist|. | 26 // Does not take ownership of |forcelist|. |
26 void SetPreferences(const ListValue* forcelist); | 27 void SetPreferences(const ListValue* forcelist); |
27 | 28 |
28 private: | 29 private: |
29 friend class MockExternalPolicyExtensionProviderVisitor; | 30 friend class MockExternalPolicyExtensionProviderVisitor; |
30 | 31 |
32 // Set the internal list of extensions based on |forcelist|. | |
33 // Does not take ownership of |forcelist|. | |
34 void ProcessPreferences(const ListValue* forcelist); | |
31 }; | 35 }; |
32 | 36 |
33 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ | 37 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ |
OLD | NEW |