Use only app permissions to decide if file entries should be writable.
commitffb8706267743f92faa5314e1e61c7c76c65e0dd
authorsammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 29 Aug 2013 10:02:25 +0000 (29 10:02 +0000)
committersammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 29 Aug 2013 10:02:25 +0000 (29 10:02 +0000)
tree4aa4841c888e7fb0a518850d9b383506a693b75e
parenta39dcb42c9cc46fa6598744d043f3461c542d967
Use only app permissions to decide if file entries should be writable.

Previously, apps with the fileSystem.write permission could choose to
obtain read-only files and file entries provided as launch data were
always read-only.

With this change, all file entries obtained using the chrome.fileSystem
API or provided as launch data are writable, for apps with the
fileSystem.write permission.

This makes getWritableEntry unnecessary, other than for files obtained
through other means (e.g., drag and drop).

BUG=148486

Review URL: https://chromiumcodereview.appspot.com/23202006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220254 0039d316-1c4b-4281-b951-d872f2087c98
24 files changed:
apps/app_restore_service_browsertest.cc
apps/launcher.cc
apps/saved_files_service.cc
apps/saved_files_service.h
apps/saved_files_service_unittest.cc
chrome/browser/apps/app_browsertest.cc
chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc
chrome/browser/extensions/api/file_handlers/app_file_handler_util.h
chrome/browser/extensions/api/file_system/file_system_api.cc
chrome/browser/extensions/api/file_system/file_system_api.h
chrome/browser/extensions/api/file_system/file_system_apitest.cc
chrome/browser/extensions/api/runtime/runtime_apitest.cc
chrome/common/extensions/api/file_system.idl
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry/manifest.json
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry/test.js
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry_with_write/background.js [new file with mode: 0644]
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry_with_write/manifest.json [copied from chrome/test/data/extensions/api_test/file_system/is_writable_file_entry/manifest.json with 100% similarity]
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry_with_write/test.html [new file with mode: 0644]
chrome/test/data/extensions/api_test/file_system/is_writable_file_entry_with_write/test.js [new file with mode: 0644]
chrome/test/data/extensions/api_test/file_system/open_existing_with_write/test.js
chrome/test/data/extensions/api_test/file_system/restore_entry/manifest.json
chrome/test/data/extensions/platform_apps/launch_new_file/manifest.json [new file with mode: 0644]
chrome/test/data/extensions/platform_apps/launch_new_file/test.js [new file with mode: 0644]
chrome/test/data/extensions/platform_apps/launch_new_file/test_util.js [new file with mode: 0644]