| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 // This passes ownership of the returned set to the caller. | 253 // This passes ownership of the returned set to the caller. |
| 254 extensions::PermissionSet* GetGrantedPermissions( | 254 extensions::PermissionSet* GetGrantedPermissions( |
| 255 const std::string& extension_id); | 255 const std::string& extension_id); |
| 256 | 256 |
| 257 // Adds |permissions| to the granted permissions set for the extension with | 257 // Adds |permissions| to the granted permissions set for the extension with |
| 258 // |extension_id|. The new granted permissions set will be the union of | 258 // |extension_id|. The new granted permissions set will be the union of |
| 259 // |permissions| and the already granted permissions. | 259 // |permissions| and the already granted permissions. |
| 260 void AddGrantedPermissions(const std::string& extension_id, | 260 void AddGrantedPermissions(const std::string& extension_id, |
| 261 const extensions::PermissionSet* permissions); | 261 const extensions::PermissionSet* permissions); |
| 262 | 262 |
| 263 // As above, but subtracts the given |permissions| from the granted set. |
| 264 void RemoveGrantedPermissions(const std::string& extension_id, |
| 265 const extensions::PermissionSet* permissions); |
| 266 |
| 263 // Gets the active permission set for the specified extension. This may | 267 // Gets the active permission set for the specified extension. This may |
| 264 // differ from the permissions in the manifest due to the optional | 268 // differ from the permissions in the manifest due to the optional |
| 265 // permissions API. This passes ownership of the set to the caller. | 269 // permissions API. This passes ownership of the set to the caller. |
| 266 extensions::PermissionSet* GetActivePermissions( | 270 extensions::PermissionSet* GetActivePermissions( |
| 267 const std::string& extension_id); | 271 const std::string& extension_id); |
| 268 | 272 |
| 269 // Sets the active |permissions| for the extension with |extension_id|. | 273 // Sets the active |permissions| for the extension with |extension_id|. |
| 270 void SetActivePermissions(const std::string& extension_id, | 274 void SetActivePermissions(const std::string& extension_id, |
| 271 const extensions::PermissionSet* permissions); | 275 const extensions::PermissionSet* permissions); |
| 272 | 276 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // Contains all the logic for handling the order for various extension | 550 // Contains all the logic for handling the order for various extension |
| 547 // properties. | 551 // properties. |
| 548 scoped_ptr<ExtensionSorting> extension_sorting_; | 552 scoped_ptr<ExtensionSorting> extension_sorting_; |
| 549 | 553 |
| 550 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; | 554 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; |
| 551 | 555 |
| 552 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 556 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 553 }; | 557 }; |
| 554 | 558 |
| 555 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 559 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |