Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/extensions/external_policy_extension_provider.h

Issue 5784004: Add DCHECKs to StatefulExternalExtensionProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase before commit Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 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.
18 class ExternalPolicyExtensionProvider 21 class ExternalPolicyExtensionProvider
19 : public StatefulExternalExtensionProvider { 22 : public StatefulExternalExtensionProvider {
20 public: 23 public:
21 explicit ExternalPolicyExtensionProvider(); 24 explicit ExternalPolicyExtensionProvider(const ListValue* forcelist);
22 virtual ~ExternalPolicyExtensionProvider(); 25 virtual ~ExternalPolicyExtensionProvider();
23 26
24 // Set the internal list of extensions based on |forcelist|. 27 // Set the internal list of extensions based on |forcelist|.
25 // Does not take ownership of |forcelist|. 28 // Does not take ownership of |forcelist|.
26 void SetPreferences(const ListValue* forcelist); 29 void SetPreferences(const ListValue* forcelist);
27 30
28 private: 31 private:
29 friend class MockExternalPolicyExtensionProviderVisitor; 32 friend class MockExternalPolicyExtensionProviderVisitor;
30 33
34 // Set the internal list of extensions based on |forcelist|.
35 // Does not take ownership of |forcelist|.
36 void ProcessPreferences(const ListValue* forcelist);
31 }; 37 };
32 38
33 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_ 39 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/external_policy_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698