Chromium Code Reviews| Index: extensions/common/permissions/permissions_data.h |
| diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h |
| index e0f9b107a3b567e15da6797fc053410263206275..d3238b11fd81b269e583798fb0e3542a62dd0933 100644 |
| --- a/extensions/common/permissions/permissions_data.h |
| +++ b/extensions/common/permissions/permissions_data.h |
| @@ -201,24 +201,21 @@ class PermissionsData { |
| // page itself. |
| bool CanCaptureVisiblePage(int tab_id, std::string* error) const; |
| - const scoped_refptr<const PermissionSet>& active_permissions() const { |
| + // Returns the tab permissions map. |
| + TabPermissionsMap GetTabSpecificPermissionsMap() const; |
|
Jeffrey Yasskin
2015/04/23 23:45:41
I'm nervous about returning a std::map by value.
Devlin
2015/04/23 23:54:43
Returning by reference is also Bad, because it's a
|
| + |
| + scoped_refptr<const PermissionSet> active_permissions() const { |
| // We lock so that we can't also be setting the permissions while returning. |
| base::AutoLock auto_lock(runtime_lock_); |
| return active_permissions_unsafe_; |
| } |
| - const scoped_refptr<const PermissionSet>& withheld_permissions() const { |
| + scoped_refptr<const PermissionSet> withheld_permissions() const { |
| // We lock so that we can't also be setting the permissions while returning. |
| base::AutoLock auto_lock(runtime_lock_); |
| return withheld_permissions_unsafe_; |
| } |
| - const TabPermissionsMap& tab_specific_permissions() const { |
| - // We lock so that we can't also be setting the permissions while returning. |
| - base::AutoLock auto_lock(runtime_lock_); |
| - return tab_specific_permissions_; |
| - } |
| - |
| #if defined(UNIT_TEST) |
| scoped_refptr<const PermissionSet> GetTabSpecificPermissionsForTesting( |
| int tab_id) const { |