| 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 EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ | 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ |
| 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ | 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 kHosts1ReadOnly, | 97 kHosts1ReadOnly, |
| 98 kHosts2ReadOnly, | 98 kHosts2ReadOnly, |
| 99 kHosts3ReadOnly, | 99 kHosts3ReadOnly, |
| 100 kHosts4OrMoreReadOnly, | 100 kHosts4OrMoreReadOnly, |
| 101 kHostsAllReadOnly, | 101 kHostsAllReadOnly, |
| 102 kInterceptAllKeys, | 102 kInterceptAllKeys, |
| 103 // Last entry: Add new entries above and ensure to update the | 103 // Last entry: Add new entries above and ensure to update the |
| 104 // "ExtensionPermission2" enum in tools/metrics/histograms/histograms.xml. | 104 // "ExtensionPermission2" enum in tools/metrics/histograms/histograms.xml. |
| 105 kEnumBoundary, | 105 kEnumBoundary, |
| 106 }; | 106 }; |
| 107 COMPILE_ASSERT(PermissionMessage::kNone > PermissionMessage::kUnknown, | 107 static_assert(PermissionMessage::kNone > PermissionMessage::kUnknown, |
| 108 kNone_not_greater_than_kUnknown); | 108 "kNone should not greater than kUnknown"); |
| 109 | 109 |
| 110 // Creates the corresponding permission message. | 110 // Creates the corresponding permission message. |
| 111 PermissionMessage(ID id, const base::string16& message); | 111 PermissionMessage(ID id, const base::string16& message); |
| 112 PermissionMessage(ID id, | 112 PermissionMessage(ID id, |
| 113 const base::string16& message, | 113 const base::string16& message, |
| 114 const base::string16& details); | 114 const base::string16& details); |
| 115 ~PermissionMessage(); | 115 ~PermissionMessage(); |
| 116 | 116 |
| 117 // Gets the id of the permission message, which can be used in UMA | 117 // Gets the id of the permission message, which can be used in UMA |
| 118 // histograms. | 118 // histograms. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 140 ID id_; | 140 ID id_; |
| 141 base::string16 message_; | 141 base::string16 message_; |
| 142 base::string16 details_; | 142 base::string16 details_; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 typedef std::vector<PermissionMessage> PermissionMessages; | 145 typedef std::vector<PermissionMessage> PermissionMessages; |
| 146 | 146 |
| 147 } // namespace extensions | 147 } // namespace extensions |
| 148 | 148 |
| 149 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ | 149 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSION_MESSAGE_H_ |
| OLD | NEW |