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

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

Issue 706623004: Add minimum version to extension management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ext-update-url
Patch Set: fix comment Created 6 years, 1 month 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 APIPermissionSet GetBlockedAPIPermissions(const Extension* extension) const; 114 APIPermissionSet GetBlockedAPIPermissions(const Extension* extension) const;
115 115
116 // Returns blocked permission set for |extension|. 116 // Returns blocked permission set for |extension|.
117 scoped_refptr<const PermissionSet> GetBlockedPermissions( 117 scoped_refptr<const PermissionSet> GetBlockedPermissions(
118 const Extension* extension) const; 118 const Extension* extension) const;
119 119
120 // Returns true if every permission in |perms| is allowed for |extension|. 120 // Returns true if every permission in |perms| is allowed for |extension|.
121 bool IsPermissionSetAllowed(const Extension* extension, 121 bool IsPermissionSetAllowed(const Extension* extension,
122 scoped_refptr<const PermissionSet> perms) const; 122 scoped_refptr<const PermissionSet> perms) const;
123 123
124 // Returns true if |extension| meets the minimum required version set for it.
125 // If there is no such requirement set for it, returns true as well.
126 // If false is returned and |required_version| is not null, set it to the
127 // minimum required version as string.
Finnur 2014/11/19 10:16:25 s/set it to the minimum required version as string
binjin 2014/11/19 13:36:10 Done.
128 bool CheckMinimumVersion(const Extension* extension,
129 std::string* required_version) const;
130
124 private: 131 private:
125 typedef base::ScopedPtrHashMap<ExtensionId, internal::IndividualSettings> 132 typedef base::ScopedPtrHashMap<ExtensionId, internal::IndividualSettings>
126 SettingsIdMap; 133 SettingsIdMap;
127 typedef base::ScopedPtrHashMap<std::string, internal::IndividualSettings> 134 typedef base::ScopedPtrHashMap<std::string, internal::IndividualSettings>
128 SettingsUpdateUrlMap; 135 SettingsUpdateUrlMap;
129 friend class ExtensionManagementServiceTest; 136 friend class ExtensionManagementServiceTest;
130 137
131 // Load all extension management preferences from |pref_service|, and 138 // Load all extension management preferences from |pref_service|, and
132 // refresh the settings. 139 // refresh the settings.
133 void Refresh(); 140 void Refresh();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 content::BrowserContext* context) const override; 208 content::BrowserContext* context) const override;
202 void RegisterProfilePrefs( 209 void RegisterProfilePrefs(
203 user_prefs::PrefRegistrySyncable* registry) override; 210 user_prefs::PrefRegistrySyncable* registry) override;
204 211
205 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory); 212 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementFactory);
206 }; 213 };
207 214
208 } // namespace extensions 215 } // namespace extensions
209 216
210 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_ 217 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698