| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVIDER_
H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVIDER_
H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVIDER_
H_ | 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVIDER_
H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 virtual bool IsPrivilegeIncrease( | 32 virtual bool IsPrivilegeIncrease( |
| 33 const PermissionSet* old_permissions, | 33 const PermissionSet* old_permissions, |
| 34 const PermissionSet* new_permissions, | 34 const PermissionSet* new_permissions, |
| 35 Manifest::Type extension_type) const OVERRIDE; | 35 Manifest::Type extension_type) const OVERRIDE; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 // Gets the permission messages for the API permissions. | 38 // Gets the permission messages for the API permissions. |
| 39 std::set<PermissionMessage> GetAPIPermissionMessages( | 39 std::set<PermissionMessage> GetAPIPermissionMessages( |
| 40 const PermissionSet* permissions) const; | 40 const PermissionSet* permissions) const; |
| 41 | 41 |
| 42 // Gets the permission messages for the Manifest permissions. |
| 43 std::set<PermissionMessage> GetManifestPermissionMessages( |
| 44 const PermissionSet* permissions) const; |
| 45 |
| 42 // Gets the permission messages for the host permissions. | 46 // Gets the permission messages for the host permissions. |
| 43 std::set<PermissionMessage> GetHostPermissionMessages( | 47 std::set<PermissionMessage> GetHostPermissionMessages( |
| 44 const PermissionSet* permissions, | 48 const PermissionSet* permissions, |
| 45 Manifest::Type extension_type) const; | 49 Manifest::Type extension_type) const; |
| 46 | 50 |
| 47 // Returns true if |new_permissions| has an elevated API privilege level | 51 // Returns true if |new_permissions| has an elevated API privilege level |
| 48 // compared to |old_permissions|. | 52 // compared to |old_permissions|. |
| 49 bool IsAPIPrivilegeIncrease( | 53 bool IsAPIPrivilegeIncrease( |
| 50 const PermissionSet* old_permissions, | 54 const PermissionSet* old_permissions, |
| 51 const PermissionSet* new_permissions) const; | 55 const PermissionSet* new_permissions) const; |
| 52 | 56 |
| 53 // Returns true if |new_permissions| has more host permissions compared to | 57 // Returns true if |new_permissions| has more host permissions compared to |
| 54 // |old_permissions|. | 58 // |old_permissions|. |
| 55 bool IsHostPrivilegeIncrease( | 59 bool IsHostPrivilegeIncrease( |
| 56 const PermissionSet* old_permissions, | 60 const PermissionSet* old_permissions, |
| 57 const PermissionSet* new_permissions, | 61 const PermissionSet* new_permissions, |
| 58 Manifest::Type extension_type) const; | 62 Manifest::Type extension_type) const; |
| 59 | 63 |
| 60 DISALLOW_COPY_AND_ASSIGN(ChromePermissionMessageProvider); | 64 DISALLOW_COPY_AND_ASSIGN(ChromePermissionMessageProvider); |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 } // namespace extensions | 67 } // namespace extensions |
| 64 | 68 |
| 65 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVID
ER_H_ | 69 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_CHROME_PERMISSION_MESSAGE_PROVID
ER_H_ |
| OLD | NEW |