Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: chrome/common/extensions/permissions/chrome_api_permissions.cc

Issue 13947050: Stop forcing optional permission on usbDevices section (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove APIPermissionInfo::kFlagMustBeOptional and related tests. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" 5 #include "chrome/common/extensions/permissions/chrome_api_permissions.h"
6 6
7 #include "chrome/common/extensions/permissions/api_permission.h" 7 #include "chrome/common/extensions/permissions/api_permission.h"
8 #include "chrome/common/extensions/permissions/api_permission_set.h" 8 #include "chrome/common/extensions/permissions/api_permission_set.h"
9 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h" 9 #include "chrome/common/extensions/permissions/bluetooth_device_permission.h"
10 #include "chrome/common/extensions/permissions/media_galleries_permission.h" 10 #include "chrome/common/extensions/permissions/media_galleries_permission.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 { APIPermission::kBluetooth, "bluetooth", APIPermissionInfo::kFlagNone, 244 { APIPermission::kBluetooth, "bluetooth", APIPermissionInfo::kFlagNone,
245 IDS_EXTENSION_PROMPT_WARNING_BLUETOOTH, 245 IDS_EXTENSION_PROMPT_WARNING_BLUETOOTH,
246 PermissionMessage::kBluetooth }, 246 PermissionMessage::kBluetooth },
247 { APIPermission::kBluetoothDevice, "bluetoothDevices", 247 { APIPermission::kBluetoothDevice, "bluetoothDevices",
248 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone, 248 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone,
249 &CreateAPIPermission<BluetoothDevicePermission> }, 249 &CreateAPIPermission<BluetoothDevicePermission> },
250 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone, 250 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone,
251 IDS_EXTENSION_PROMPT_WARNING_USB, 251 IDS_EXTENSION_PROMPT_WARNING_USB,
252 PermissionMessage::kUsb }, 252 PermissionMessage::kUsb },
253 { APIPermission::kUsbDevice, "usbDevices", 253 { APIPermission::kUsbDevice, "usbDevices",
254 APIPermissionInfo::kFlagMustBeOptional, 0, PermissionMessage::kNone, 254 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone,
255 &CreateAPIPermission<UsbDevicePermission> }, 255 &CreateAPIPermission<UsbDevicePermission> },
256 { APIPermission::kSystemIndicator, "systemIndicator", 256 { APIPermission::kSystemIndicator, "systemIndicator",
257 APIPermissionInfo::kFlagNone, 257 APIPermissionInfo::kFlagNone,
258 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, 258 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR,
259 PermissionMessage::kSystemIndicator }, 259 PermissionMessage::kSystemIndicator },
260 { APIPermission::kSystemInfoDisplay, "systemInfo.display" }, 260 { APIPermission::kSystemInfoDisplay, "systemInfo.display" },
261 { APIPermission::kPointerLock, "pointerLock" }, 261 { APIPermission::kPointerLock, "pointerLock" },
262 { APIPermission::kFullscreen, "fullscreen" }, 262 { APIPermission::kFullscreen, "fullscreen" },
263 { APIPermission::kAudio, "audio" }, 263 { APIPermission::kAudio, "audio" },
264 }; 264 };
(...skipping 16 matching lines...) Expand all
281 // Register aliases. 281 // Register aliases.
282 std::vector<PermissionsInfo::AliasInfo> aliases; 282 std::vector<PermissionsInfo::AliasInfo> aliases;
283 aliases.push_back(PermissionsInfo::AliasInfo( 283 aliases.push_back(PermissionsInfo::AliasInfo(
284 "unlimitedStorage", kOldUnlimitedStoragePermission)); 284 "unlimitedStorage", kOldUnlimitedStoragePermission));
285 aliases.push_back(PermissionsInfo::AliasInfo( 285 aliases.push_back(PermissionsInfo::AliasInfo(
286 "tabs", kWindowsPermission)); 286 "tabs", kWindowsPermission));
287 return aliases; 287 return aliases;
288 } 288 }
289 289
290 } // namespace extensions 290 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/permissions/api_permission.h ('k') | chrome/common/extensions/permissions/permissions_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698