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

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 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // Register aliases. 385 // Register aliases.
385 std::vector<PermissionsProvider::AliasInfo> aliases; 386 std::vector<PermissionsProvider::AliasInfo> aliases;
386 aliases.push_back(PermissionsProvider::AliasInfo( 387 aliases.push_back(PermissionsProvider::AliasInfo(
387 "unlimitedStorage", kOldUnlimitedStoragePermission)); 388 "unlimitedStorage", kOldUnlimitedStoragePermission));
388 aliases.push_back(PermissionsProvider::AliasInfo( 389 aliases.push_back(PermissionsProvider::AliasInfo(
389 "tabs", kWindowsPermission)); 390 "tabs", kWindowsPermission));
390 return aliases; 391 return aliases;
391 } 392 }
392 393
393 } // namespace extensions 394 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/file_system_provider.idl ('k') | chrome/common/extensions/permissions/permission_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698