| 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 #include "chrome/common/extensions/permissions/api_permission.h" | 5 #include "chrome/common/extensions/permissions/api_permission.h" |
| 6 | 6 |
| 7 #include "chrome/common/extensions/permissions/permissions_info.h" | 7 #include "chrome/common/extensions/permissions/permissions_info.h" |
| 8 #include "chrome/common/extensions/permissions/socket_permission.h" | 8 #include "chrome/common/extensions/permissions/socket_permission.h" |
| 9 #include "grit/chromium_strings.h" |
| 9 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 11 | 12 |
| 12 namespace { | 13 namespace { |
| 13 | 14 |
| 14 using extensions::APIPermission; | 15 using extensions::APIPermission; |
| 15 using extensions::APIPermissionDetail; | 16 using extensions::APIPermissionDetail; |
| 16 | 17 |
| 17 const char kOldUnlimitedStoragePermission[] = "unlimited_storage"; | 18 const char kOldUnlimitedStoragePermission[] = "unlimited_storage"; |
| 18 const char kWindowsPermission[] = "windows"; | 19 const char kWindowsPermission[] = "windows"; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 { kDeclarativeWebRequest, "declarativeWebRequest" }, | 149 { kDeclarativeWebRequest, "declarativeWebRequest" }, |
| 149 { kDownloads, "downloads", kFlagNone, | 150 { kDownloads, "downloads", kFlagNone, |
| 150 IDS_EXTENSION_PROMPT_WARNING_DOWNLOADS, | 151 IDS_EXTENSION_PROMPT_WARNING_DOWNLOADS, |
| 151 PermissionMessage::kDownloads }, | 152 PermissionMessage::kDownloads }, |
| 152 { kExperimental, "experimental", kFlagCannotBeOptional }, | 153 { kExperimental, "experimental", kFlagCannotBeOptional }, |
| 153 { kGeolocation, "geolocation", kFlagCannotBeOptional, | 154 { kGeolocation, "geolocation", kFlagCannotBeOptional, |
| 154 IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION, | 155 IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION, |
| 155 PermissionMessage::kGeolocation }, | 156 PermissionMessage::kGeolocation }, |
| 156 { kNotification, "notifications" }, | 157 { kNotification, "notifications" }, |
| 157 { kUnlimitedStorage, "unlimitedStorage", kFlagCannotBeOptional }, | 158 { kUnlimitedStorage, "unlimitedStorage", kFlagCannotBeOptional }, |
| 159 { kWM, "wm", kFlagNone, IDS_EXTENSION_PROMPT_WARNING_WM, |
| 160 PermissionMessage::kWindowManager }, |
| 158 | 161 |
| 159 // Register hosted and packaged app permissions. | 162 // Register hosted and packaged app permissions. |
| 160 { kAppNotifications, "appNotifications" }, | 163 { kAppNotifications, "appNotifications" }, |
| 161 | 164 |
| 162 // Register extension permissions. | 165 // Register extension permissions. |
| 163 { kActiveTab, "activeTab" }, | 166 { kActiveTab, "activeTab" }, |
| 164 { kAlarms, "alarms" }, | 167 { kAlarms, "alarms" }, |
| 165 { kBookmark, "bookmarks", kFlagNone, | 168 { kBookmark, "bookmarks", kFlagNone, |
| 166 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, | 169 IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS, |
| 167 PermissionMessage::kBookmarks }, | 170 PermissionMessage::kBookmarks }, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 279 |
| 277 // Register aliases. | 280 // Register aliases. |
| 278 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); | 281 info->RegisterAlias("unlimitedStorage", kOldUnlimitedStoragePermission); |
| 279 info->RegisterAlias("tabs", kWindowsPermission); | 282 info->RegisterAlias("tabs", kWindowsPermission); |
| 280 } | 283 } |
| 281 | 284 |
| 282 APIPermissionDetail::~APIPermissionDetail() { | 285 APIPermissionDetail::~APIPermissionDetail() { |
| 283 } | 286 } |
| 284 | 287 |
| 285 } // namespace extensions | 288 } // namespace extensions |
| OLD | NEW |