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

Side by Side Diff: webkit/tools/test_shell/simple_file_writer.cc

Issue 10920087: Update callers of CreateFileSystemOperation so more detailed error codes can be returned. Where app… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/tools/test_shell/simple_file_system.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/tools/test_shell/simple_file_writer.h" 5 #include "webkit/tools/test_shell/simple_file_writer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 return; 86 return;
87 } 87 }
88 operation_->Cancel(base::Bind(&IOThreadProxy::DidFinish, this)); 88 operation_->Cancel(base::Bind(&IOThreadProxy::DidFinish, this));
89 } 89 }
90 90
91 private: 91 private:
92 friend class base::RefCountedThreadSafe<IOThreadProxy>; 92 friend class base::RefCountedThreadSafe<IOThreadProxy>;
93 virtual ~IOThreadProxy() {} 93 virtual ~IOThreadProxy() {}
94 94
95 FileSystemOperation* GetNewOperation( const FileSystemURL& url) { 95 FileSystemOperation* GetNewOperation( const FileSystemURL& url) {
96 return file_system_context_->CreateFileSystemOperation(url); 96 return file_system_context_->CreateFileSystemOperation(url, NULL);
97 } 97 }
98 98
99 // Returns true if it is not writable. 99 // Returns true if it is not writable.
100 bool FailIfNotWritable(const FileSystemURL& url) { 100 bool FailIfNotWritable(const FileSystemURL& url) {
101 if (url.type() == fileapi::kFileSystemTypeDragged) { 101 if (url.type() == fileapi::kFileSystemTypeDragged) {
102 // Write is not allowed in isolate file system in SimpleFileWriter. 102 // Write is not allowed in isolate file system in SimpleFileWriter.
103 DidFailOnMainThread(base::PLATFORM_FILE_ERROR_SECURITY); 103 DidFailOnMainThread(base::PLATFORM_FILE_ERROR_SECURITY);
104 return true; 104 return true;
105 } 105 }
106 return false; 106 return false;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 195
196 void SimpleFileWriter::DoWrite( 196 void SimpleFileWriter::DoWrite(
197 const GURL& path, const GURL& blob_url, int64 offset) { 197 const GURL& path, const GURL& blob_url, int64 offset) {
198 FileSystemURL url(path); 198 FileSystemURL url(path);
199 io_thread_proxy_->Write(url, blob_url, offset); 199 io_thread_proxy_->Write(url, blob_url, offset);
200 } 200 }
201 201
202 void SimpleFileWriter::DoCancel() { 202 void SimpleFileWriter::DoCancel() {
203 io_thread_proxy_->Cancel(); 203 io_thread_proxy_->Cancel();
204 } 204 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/simple_file_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698