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

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: Remove unused function. Created 6 years, 10 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 // on the permissions parameters, no message ID or message text is 326 // on the permissions parameters, no message ID or message text is
328 // specified here. 327 // specified here.
329 // The message ID and text used will be determined at run-time in the 328 // The message ID and text used will be determined at run-time in the
330 // |MediaGalleriesPermission| class. 329 // |MediaGalleriesPermission| class.
331 { APIPermission::kMediaGalleries, "mediaGalleries", 330 { APIPermission::kMediaGalleries, "mediaGalleries",
332 APIPermissionInfo::kFlagNone, 0, 331 APIPermissionInfo::kFlagNone, 0,
333 PermissionMessage::kNone, 332 PermissionMessage::kNone,
334 &CreateAPIPermission<MediaGalleriesPermission> }, 333 &CreateAPIPermission<MediaGalleriesPermission> },
335 { APIPermission::kPushMessaging, "pushMessaging", 334 { APIPermission::kPushMessaging, "pushMessaging",
336 APIPermissionInfo::kFlagCannotBeOptional }, 335 APIPermissionInfo::kFlagCannotBeOptional },
337 // Because warning messages for the "bluetooth" permission vary based on
338 // the permissions parameters, no message ID or message text is specified
339 // here. The message ID and text used will be determined at run-time in the
340 // |BluetoothPermission| class.
341 { APIPermission::kBluetooth, "bluetooth", APIPermissionInfo::kFlagNone,
342 0, PermissionMessage::kNone,
343 &CreateAPIPermission<BluetoothPermission> },
344 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone, 336 { APIPermission::kUsb, "usb", APIPermissionInfo::kFlagNone,
345 IDS_EXTENSION_PROMPT_WARNING_USB, 337 IDS_EXTENSION_PROMPT_WARNING_USB,
346 PermissionMessage::kUsb }, 338 PermissionMessage::kUsb },
347 { APIPermission::kUsbDevice, "usbDevices", 339 { APIPermission::kUsbDevice, "usbDevices",
348 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone, 340 APIPermissionInfo::kFlagNone, 0, PermissionMessage::kNone,
349 &CreateAPIPermission<UsbDevicePermission> }, 341 &CreateAPIPermission<UsbDevicePermission> },
350 { APIPermission::kSystemIndicator, "systemIndicator", 342 { APIPermission::kSystemIndicator, "systemIndicator",
351 APIPermissionInfo::kFlagNone, 343 APIPermissionInfo::kFlagNone,
352 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR, 344 IDS_EXTENSION_PROMPT_WARNING_SYSTEM_INDICATOR,
353 PermissionMessage::kSystemIndicator }, 345 PermissionMessage::kSystemIndicator },
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Register aliases. 390 // Register aliases.
399 std::vector<PermissionsProvider::AliasInfo> aliases; 391 std::vector<PermissionsProvider::AliasInfo> aliases;
400 aliases.push_back(PermissionsProvider::AliasInfo( 392 aliases.push_back(PermissionsProvider::AliasInfo(
401 "unlimitedStorage", kOldUnlimitedStoragePermission)); 393 "unlimitedStorage", kOldUnlimitedStoragePermission));
402 aliases.push_back(PermissionsProvider::AliasInfo( 394 aliases.push_back(PermissionsProvider::AliasInfo(
403 "tabs", kWindowsPermission)); 395 "tabs", kWindowsPermission));
404 return aliases; 396 return aliases;
405 } 397 }
406 398
407 } // namespace extensions 399 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698