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

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

Issue 50703013: fileSystemProvider: First cut at implementing fileSystemProvider API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments and make it build only on chromeos Created 7 years, 1 month 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/bluetooth_permission.h" 7 #include "chrome/common/extensions/permissions/bluetooth_permission.h"
8 #include "chrome/common/extensions/permissions/media_galleries_permission.h" 8 #include "chrome/common/extensions/permissions/media_galleries_permission.h"
9 #include "chrome/common/extensions/permissions/socket_permission.h" 9 #include "chrome/common/extensions/permissions/socket_permission.h"
10 #include "chrome/common/extensions/permissions/usb_device_permission.h" 10 #include "chrome/common/extensions/permissions/usb_device_permission.h"
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // The permission string for "fileSystem" is only shown when "write" or 295 // The permission string for "fileSystem" is only shown when "write" or
296 // "directory" is present. Read-only access is only granted after the user 296 // "directory" is present. Read-only access is only granted after the user
297 // has been shown a file or directory chooser dialog and selected a file or 297 // has been shown a file or directory chooser dialog and selected a file or
298 // directory . Selecting the file or directory is considered consent to 298 // directory . Selecting the file or directory is considered consent to
299 // read it. 299 // read it.
300 { APIPermission::kFileSystem, "fileSystem" }, 300 { APIPermission::kFileSystem, "fileSystem" },
301 { APIPermission::kFileSystemDirectory, "fileSystem.directory", 301 { APIPermission::kFileSystemDirectory, "fileSystem.directory",
302 APIPermissionInfo::kFlagNone, 302 APIPermissionInfo::kFlagNone,
303 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_DIRECTORY, 303 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_DIRECTORY,
304 PermissionMessage::kFileSystemDirectory }, 304 PermissionMessage::kFileSystemDirectory },
305 { APIPermission::kFileSystemProvider, "fileSystemProvider" },
305 { APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries" }, 306 { APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries" },
306 { APIPermission::kFileSystemWrite, "fileSystem.write", 307 { APIPermission::kFileSystemWrite, "fileSystem.write",
307 APIPermissionInfo::kFlagNone, 308 APIPermissionInfo::kFlagNone,
308 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE, 309 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE,
309 PermissionMessage::kFileSystemWrite }, 310 PermissionMessage::kFileSystemWrite },
310 { APIPermission::kFileSystemWriteDirectory, "fileSystem.writeDirectory", 311 { APIPermission::kFileSystemWriteDirectory, "fileSystem.writeDirectory",
311 APIPermissionInfo::kFlagNone, 312 APIPermissionInfo::kFlagNone,
312 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE_DIRECTORY, 313 IDS_EXTENSION_PROMPT_WARNING_FILE_SYSTEM_WRITE_DIRECTORY,
313 PermissionMessage::kFileSystemWriteDirectory }, 314 PermissionMessage::kFileSystemWriteDirectory },
314 // Because warning messages for the "mediaGalleries" permission vary based 315 // Because warning messages for the "mediaGalleries" permission vary based
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 // Register aliases. 368 // Register aliases.
368 std::vector<PermissionsProvider::AliasInfo> aliases; 369 std::vector<PermissionsProvider::AliasInfo> aliases;
369 aliases.push_back(PermissionsProvider::AliasInfo( 370 aliases.push_back(PermissionsProvider::AliasInfo(
370 "unlimitedStorage", kOldUnlimitedStoragePermission)); 371 "unlimitedStorage", kOldUnlimitedStoragePermission));
371 aliases.push_back(PermissionsProvider::AliasInfo( 372 aliases.push_back(PermissionsProvider::AliasInfo(
372 "tabs", kWindowsPermission)); 373 "tabs", kWindowsPermission));
373 return aliases; 374 return aliases;
374 } 375 }
375 376
376 } // namespace extensions 377 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698