diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 10:02:25 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-29 10:02:25 +0000 |
commit | ffb8706267743f92faa5314e1e61c7c76c65e0dd (patch) | |
tree | 4aa4841c888e7fb0a518850d9b383506a693b75e /apps/saved_files_service.h | |
parent | a39dcb42c9cc46fa6598744d043f3461c542d967 (diff) | |
download | chromium_src-ffb8706267743f92faa5314e1e61c7c76c65e0dd.zip chromium_src-ffb8706267743f92faa5314e1e61c7c76c65e0dd.tar.gz chromium_src-ffb8706267743f92faa5314e1e61c7c76c65e0dd.tar.bz2 |
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
Diffstat (limited to 'apps/saved_files_service.h')
-rw-r--r-- | apps/saved_files_service.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/saved_files_service.h b/apps/saved_files_service.h index 48a9a42..25b96d7 100644 --- a/apps/saved_files_service.h +++ b/apps/saved_files_service.h @@ -37,7 +37,6 @@ struct SavedFileEntry { SavedFileEntry(const std::string& id, const base::FilePath& path, - bool writable, int sequence_number); // The opaque id of this file entry. @@ -46,9 +45,6 @@ struct SavedFileEntry { // The path to a file entry that the app had permission to access. base::FilePath path; - // Whether or not the app had write access to a file entry. - bool writable; - // The sequence number in the LRU of the file entry. The value 0 indicates // that the entry is not in the LRU. int sequence_number; @@ -69,8 +65,7 @@ class SavedFilesService : public BrowserContextKeyedService, // object construction are automatically registered. void RegisterFileEntry(const std::string& extension_id, const std::string& id, - const base::FilePath& file_path, - bool writable); + const base::FilePath& file_path); // If the file with |id| is not in the queue of files to be retained // permanently, adds the file to the back of the queue, evicting the least |