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

Side by Side Diff: webkit/fileapi/sandbox_file_stream_writer.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
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/fileapi/sandbox_file_stream_writer.h" 5 #include "webkit/fileapi/sandbox_file_stream_writer.h"
6 6
7 #include "base/files/file_util_proxy.h" 7 #include "base/files/file_util_proxy.h"
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 callback)); 114 callback));
115 if (result != net::ERR_IO_PENDING) 115 if (result != net::ERR_IO_PENDING)
116 has_pending_operation_ = false; 116 has_pending_operation_ = false;
117 return result; 117 return result;
118 } 118 }
119 119
120 void SandboxFileStreamWriter::DidGetFileInfo( 120 void SandboxFileStreamWriter::DidGetFileInfo(
121 const net::CompletionCallback& callback, 121 const net::CompletionCallback& callback,
122 base::PlatformFileError file_error, 122 base::PlatformFileError file_error,
123 const base::PlatformFileInfo& file_info, 123 const base::PlatformFileInfo& file_info,
124 const FilePath& platform_path) { 124 const base::FilePath& platform_path) {
125 if (CancelIfRequested()) 125 if (CancelIfRequested())
126 return; 126 return;
127 if (file_error != base::PLATFORM_FILE_OK) { 127 if (file_error != base::PLATFORM_FILE_OK) {
128 callback.Run(net::PlatformFileErrorToNetError(file_error)); 128 callback.Run(net::PlatformFileErrorToNetError(file_error));
129 return; 129 return;
130 } 130 }
131 if (file_info.is_directory) { 131 if (file_info.is_directory) {
132 // We should not be writing to a directory. 132 // We should not be writing to a directory.
133 callback.Run(net::ERR_ACCESS_DENIED); 133 callback.Run(net::ERR_ACCESS_DENIED);
134 return; 134 return;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 return true; 234 return true;
235 } 235 }
236 236
237 int SandboxFileStreamWriter::Flush(const net::CompletionCallback& callback) { 237 int SandboxFileStreamWriter::Flush(const net::CompletionCallback& callback) {
238 // For now, Flush is meaningful only for local native file access. It is no-op 238 // For now, Flush is meaningful only for local native file access. It is no-op
239 // for sandboxed filesystem files (see the discussion in crbug.com/144790). 239 // for sandboxed filesystem files (see the discussion in crbug.com/144790).
240 return net::OK; 240 return net::OK;
241 } 241 }
242 242
243 } // namespace fileapi 243 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_file_stream_writer.h ('k') | webkit/fileapi/sandbox_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698