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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/create_file.cc

Issue 427493002: [fsp] Do not allow write operations on read only file systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/create_file.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/create_file.cc b/chrome/browser/chromeos/file_system_provider/operations/create_file.cc
index 9f861c780294981bc9de05eb46b3f89bc87270d4..27fb164a9a2c9c50f1677bc118ba8a49f82c89b3 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/create_file.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/create_file.cc
@@ -26,6 +26,9 @@ CreateFile::~CreateFile() {
}
bool CreateFile::Execute(int request_id) {
+ if (!file_system_info_.writable())
+ return false;
+
scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue);
values->SetString("filePath", file_path_.AsUTF8Unsafe());

Powered by Google App Engine
This is Rietveld 408576698