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

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

Issue 536573003: Add ExtensionManagement based ExternalLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-2
Patch Set: fixes to #14 Created 6 years, 3 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSION_MANAGEMENT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Get the ManagementPolicy::Provider controlled by extension management 104 // Get the ManagementPolicy::Provider controlled by extension management
105 // policy settings. 105 // policy settings.
106 ManagementPolicy::Provider* GetProvider(); 106 ManagementPolicy::Provider* GetProvider();
107 107
108 // Checks if extensions are blacklisted by default, by policy. When true, 108 // Checks if extensions are blacklisted by default, by policy. When true,
109 // this means that even extensions without an ID should be blacklisted (e.g. 109 // this means that even extensions without an ID should be blacklisted (e.g.
110 // from the command line, or when loaded as an unpacked extension). 110 // from the command line, or when loaded as an unpacked extension).
111 bool BlacklistedByDefault(); 111 bool BlacklistedByDefault();
112 112
113 // Returns the force install list, in format specified by
114 // ExternalPolicyLoader::AddExtension().
115 scoped_ptr<base::DictionaryValue> GetForceInstallList() const;
116
117 // Returns if an extension with id |id| is allowed to install or not.
118 bool IsInstallationAllowed(const ExtensionId& id) const;
119
113 // Helper function to read |settings_by_id_| with |id| as key. Returns a 120 // Helper function to read |settings_by_id_| with |id| as key. Returns a
114 // constant reference to default settings if |id| does not exist. 121 // constant reference to default settings if |id| does not exist.
115 const IndividualSettings& ReadById(const ExtensionId& id) const; 122 const IndividualSettings& ReadById(const ExtensionId& id) const;
116 123
117 // Returns a constant reference to |global_settings_|. 124 // Returns a constant reference to |global_settings_|.
118 const GlobalSettings& ReadGlobalSettings() const; 125 const GlobalSettings& ReadGlobalSettings() const;
119 126
120 private: 127 private:
121 // Load all extension management preferences from |pref_service|, and 128 // Load all extension management preferences from |pref_service|, and
122 // refresh the settings. 129 // refresh the settings.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // BrowserContextKeyedServiceExtensionManagementFactory: 187 // BrowserContextKeyedServiceExtensionManagementFactory:
181 virtual KeyedService* BuildServiceInstanceFor( 188 virtual KeyedService* BuildServiceInstanceFor(
182 content::BrowserContext* context) const OVERRIDE; 189 content::BrowserContext* context) const OVERRIDE;
183 190
184 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 191 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
185 }; 192 };
186 193
187 } // namespace extensions 194 } // namespace extensions
188 195
189 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 196 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698