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

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

Issue 536753003: Add recommended extension installation support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-3
Patch Set: add ui changes 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 // Get the ManagementPolicy::Provider controlled by extension management 137 // Get the ManagementPolicy::Provider controlled by extension management
138 // policy settings. 138 // policy settings.
139 ManagementPolicy::Provider* GetProvider(); 139 ManagementPolicy::Provider* GetProvider();
140 140
141 // Checks if extensions are blacklisted by default, by policy. When true, 141 // Checks if extensions are blacklisted by default, by policy. When true,
142 // this means that even extensions without an ID should be blacklisted (e.g. 142 // this means that even extensions without an ID should be blacklisted (e.g.
143 // from the command line, or when loaded as an unpacked extension). 143 // from the command line, or when loaded as an unpacked extension).
144 bool BlacklistedByDefault(); 144 bool BlacklistedByDefault();
145 145
146 // Returns the force install list, in format specified by 146 // Returns a list of extensions which will be automatically installed, in
147 // ExternalPolicyLoader::AddExtension(). 147 // format specified in ExternalPolicyLoader::AddExtension().
148 scoped_ptr<base::DictionaryValue> GetForceInstallList() const; 148 // If |forced| is true, returned extensions are not permitted to be
149 // disabled by user, otherwise returned extensions are allowed to be
150 // disabled but not uninstalled.
151 // Note that these two lists have no extension in common.
152 scoped_ptr<base::DictionaryValue> GetAutoInstallList(bool forced) const;
Joao da Silva 2014/09/18 12:21:23 Use two methods instead of having the argument: s
binjin 2014/09/18 16:25:15 Done. I choosed to duplicated code here. since add
149 153
150 // Returns if an extension with id |id| is allowed to install or not. 154 // Returns if an extension with id |id| is allowed to install or not.
151 bool IsInstallationAllowed(const ExtensionId& id) const; 155 bool IsInstallationAllowed(const ExtensionId& id) const;
152 156
153 // Returns true if an extension download should be allowed to proceed. 157 // Returns true if an extension download should be allowed to proceed.
154 bool IsOffstoreInstallAllowed(const GURL& url, const GURL& referrer_url); 158 bool IsOffstoreInstallAllowed(const GURL& url, const GURL& referrer_url);
155 159
156 // Helper function to read |settings_by_id_| with |id| as key. Returns a 160 // Helper function to read |settings_by_id_| with |id| as key. Returns a
157 // constant reference to default settings if |id| does not exist. 161 // constant reference to default settings if |id| does not exist.
158 const IndividualSettings& ReadById(const ExtensionId& id) const; 162 const IndividualSettings& ReadById(const ExtensionId& id) const;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 content::BrowserContext* context) const OVERRIDE; 229 content::BrowserContext* context) const OVERRIDE;
226 virtual content::BrowserContext* GetBrowserContextToUse( 230 virtual content::BrowserContext* GetBrowserContextToUse(
227 content::BrowserContext* context) const OVERRIDE; 231 content::BrowserContext* context) const OVERRIDE;
228 232
229 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 233 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
230 }; 234 };
231 235
232 } // namespace extensions 236 } // namespace extensions
233 237
234 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 238 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698