Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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| meet the minimum required version set for it. | |
|
pastarmovj
2014/11/11 12:50:54
s/meet/meets/
binjin
2014/11/11 19:10:37
Done.
| |
| 125 // If there are no such requirement set for it, returns true as well. | |
|
pastarmovj
2014/11/11 12:50:54
s/are/is/
binjin
2014/11/11 19:10:37
Done.
| |
| 126 // If false is returned and |required_version| is not null, set it to the | |
| 127 // minimum required version as string. | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |