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

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

Issue 145663004: Replace "bluetooth" permission with manifest property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
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/bluetooth_permission.h"
8 #include "chrome/common/extensions/permissions/media_galleries_permission.h" 7 #include "chrome/common/extensions/permissions/media_galleries_permission.h"
9 #include "chrome/common/extensions/permissions/socket_permission.h" 8 #include "chrome/common/extensions/permissions/socket_permission.h"
10 #include "chrome/common/extensions/permissions/usb_device_permission.h" 9 #include "chrome/common/extensions/permissions/usb_device_permission.h"
11 #include "extensions/common/permissions/api_permission.h" 10 #include "extensions/common/permissions/api_permission.h"
12 #include "extensions/common/permissions/api_permission_set.h" 11 #include "extensions/common/permissions/api_permission_set.h"
13 #include "extensions/common/permissions/permission_message.h" 12 #include "extensions/common/permissions/permission_message.h"
14 #include "extensions/common/permissions/permissions_info.h" 13 #include "extensions/common/permissions/permissions_info.h"
15 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
16 15
17 namespace extensions { 16 namespace extensions {
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // on the permissions parameters, no message ID or message text is 322 // on the permissions parameters, no message ID or message text is
324 // specified here. 323 // specified here.
325 // The message ID and text used will be determined at run-time in the 324 // The message ID and text used will be determined at run-time in the
326 // |MediaGalleriesPermission| class. 325 // |MediaGalleriesPermission| class.
327 { APIPermission::kMediaGalleries, "mediaGalleries", 326 { APIPermission::kMediaGalleries, "mediaGalleries",
328 APIPermissionInfo::kFlagNone, 0, 327 APIPermissionInfo::kFlagNone, 0,
329 PermissionMessage::kNone, 328 PermissionMessage::kNone,
330 &CreateAPIPermission<MediaGalleriesPermission> }, 329 &CreateAPIPermission<MediaGalleriesPermission> },
331 { APIPermission::kPushMessaging, "pushMessaging", 330 { APIPermission::kPushMessaging, "pushMessaging",
332 APIPermissionInfo::kFlagCannotBeOptional }, 331 APIPermissionInfo::kFlagCannotBeOptional },
333 // Because warning messages for the "bluetooth" permission vary based on
334 // the permissions parameters, no message ID or message text is specified
335 // here. The message ID and text used will be determined at run-time in the
336 // |BluetoothPermission| class.
337 { APIPermission::kBluetooth, "bluetooth", APIPermissionInfo::kFlagNone,
338 0, PermissionMessage::kNone,
339 &CreateAPIPermission<BluetoothPermission> },
340 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone, 332 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone,
341 IDS_EXTENSION_PROMPT_WARNING_USB, 333 IDS_EXTENSION_PROMPT_WARNING_USB,
342 PermissionMessage::kUsb }, 334 PermissionMessage::kUsb },
343 { APIPermission::kUsbDevice, "usbDevices", 335 { APIPermission::kUsbDevice, "usbDevices",
344 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone, 336 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone,
345 &CreateAPIPermission<UsbDevicePermission> }, 337 &CreateAPIPermission<UsbDevicePermission> },
346 { APIPermission::kSystemIndicator, "systemIndicator", 338 { APIPermission::kSystemIndicator, "systemIndicator",
347 APIPermissionInfo::kFlagNone, 339 APIPermissionInfo::kFlagNone,
348 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, 340 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR,
349 PermissionMessage::kSystemIndicator }, 341 PermissionMessage::kSystemIndicator },
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // Register aliases. 386 // Register aliases.
395 std::vector<PermissionsProvider::AliasInfo> aliases; 387 std::vector<PermissionsProvider::AliasInfo> aliases;
396 aliases.push_back(PermissionsProvider::AliasInfo( 388 aliases.push_back(PermissionsProvider::AliasInfo(
397 "unlimitedStorage", kOldUnlimitedStoragePermission)); 389 "unlimitedStorage", kOldUnlimitedStoragePermission));
398 aliases.push_back(PermissionsProvider::AliasInfo( 390 aliases.push_back(PermissionsProvider::AliasInfo(
399 "tabs", kWindowsPermission)); 391 "tabs", kWindowsPermission));
400 return aliases; 392 return aliases;
401 } 393 }
402 394
403 } // namespace extensions 395 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698