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

Side by Side Diff: webkit/fileapi/file_system_file_stream_reader.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/file_system_file_stream_reader.h" 5 #include "webkit/fileapi/file_system_file_stream_reader.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/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 callback, 100 callback,
101 error_callback)); 101 error_callback));
102 return net::ERR_IO_PENDING; 102 return net::ERR_IO_PENDING;
103 } 103 }
104 104
105 void FileSystemFileStreamReader::DidCreateSnapshot( 105 void FileSystemFileStreamReader::DidCreateSnapshot(
106 const base::Closure& callback, 106 const base::Closure& callback,
107 const net::CompletionCallback& error_callback, 107 const net::CompletionCallback& error_callback,
108 base::PlatformFileError file_error, 108 base::PlatformFileError file_error,
109 const base::PlatformFileInfo& file_info, 109 const base::PlatformFileInfo& file_info,
110 const FilePath& platform_path, 110 const base::FilePath& platform_path,
111 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) { 111 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
112 DCHECK(has_pending_create_snapshot_); 112 DCHECK(has_pending_create_snapshot_);
113 DCHECK(!local_file_reader_.get()); 113 DCHECK(!local_file_reader_.get());
114 has_pending_create_snapshot_ = false; 114 has_pending_create_snapshot_ = false;
115 115
116 if (file_error != base::PLATFORM_FILE_OK) { 116 if (file_error != base::PLATFORM_FILE_OK) {
117 error_callback.Run(net::PlatformFileErrorToNetError(file_error)); 117 error_callback.Run(net::PlatformFileErrorToNetError(file_error));
118 return; 118 return;
119 } 119 }
120 120
121 // Keep the reference (if it's non-null) so that the file won't go away. 121 // Keep the reference (if it's non-null) so that the file won't go away.
122 snapshot_ref_ = file_ref; 122 snapshot_ref_ = file_ref;
123 123
124 local_file_reader_.reset( 124 local_file_reader_.reset(
125 new LocalFileStreamReader( 125 new LocalFileStreamReader(
126 file_system_context_->task_runners()->file_task_runner(), 126 file_system_context_->task_runners()->file_task_runner(),
127 platform_path, initial_offset_, expected_modification_time_)); 127 platform_path, initial_offset_, expected_modification_time_));
128 128
129 callback.Run(); 129 callback.Run();
130 } 130 }
131 131
132 } // namespace fileapi 132 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_stream_reader.h ('k') | webkit/fileapi/file_system_file_stream_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698