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

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: fixes addressing #3 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void AddObserver(Observer* observer); 102 void AddObserver(Observer* observer);
103 void RemoveObserver(Observer* observer); 103 void RemoveObserver(Observer* observer);
104 104
105 // Get the ManagementPolicy::Provider controlled by extension management 105 // Get the ManagementPolicy::Provider controlled by extension management
106 // policy settings. 106 // policy settings.
107 ManagementPolicy::Provider* GetProvider(); 107 ManagementPolicy::Provider* GetProvider();
108 108
109 // Checks if extensions are blacklisted by default, by policy. When true, 109 // Checks if extensions are blacklisted by default, by policy. When true,
110 // this means that even extensions without an ID should be blacklisted (e.g. 110 // this means that even extensions without an ID should be blacklisted (e.g.
111 // from the command line, or when loaded as an unpacked extension). 111 // from the command line, or when loaded as an unpacked extension).
112 bool BlacklistedByDefault(); 112 bool BlacklistedByDefault() const;
113 113
114 // Returns the force install list, in format specified by 114 // Returns the force install list, in format specified by
115 // ExternalPolicyLoader::AddExtension(). 115 // ExternalPolicyLoader::AddExtension().
116 scoped_ptr<base::DictionaryValue> GetForceInstallList() const; 116 scoped_ptr<base::DictionaryValue> GetForceInstallList() const;
117 117
118 // Like GetRecommendedInstallList(), but returns recommended install list
119 // instead.
120 scoped_ptr<base::DictionaryValue> GetRecommendedInstallList() const;
121
118 // Returns if an extension with id |id| is allowed to install or not. 122 // Returns if an extension with id |id| is allowed to install or not.
119 bool IsInstallationAllowed(const ExtensionId& id) const; 123 bool IsInstallationAllowed(const ExtensionId& id) const;
120 124
121 // Returns true if an extension download should be allowed to proceed. 125 // Returns true if an extension download should be allowed to proceed.
122 bool IsOffstoreInstallAllowed(const GURL& url, const GURL& referrer_url); 126 bool IsOffstoreInstallAllowed(const GURL& url, const GURL& referrer_url);
123 127
124 // Helper function to read |settings_by_id_| with |id| as key. Returns a 128 // Helper function to read |settings_by_id_| with |id| as key. Returns a
125 // constant reference to default settings if |id| does not exist. 129 // constant reference to default settings if |id| does not exist.
126 const IndividualSettings& ReadById(const ExtensionId& id) const; 130 const IndividualSettings& ReadById(const ExtensionId& id) const;
127 131
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 content::BrowserContext* context) const OVERRIDE; 199 content::BrowserContext* context) const OVERRIDE;
196 virtual void RegisterProfilePrefs( 200 virtual void RegisterProfilePrefs(
197 user_prefs::PrefRegistrySyncable* registry) OVERRIDE; 201 user_prefs::PrefRegistrySyncable* registry) OVERRIDE;
198 202
199 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 203 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
200 }; 204 };
201 205
202 } // namespace extensions 206 } // namespace extensions
203 207
204 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 208 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698