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

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

Issue 10914188: Added PlatformFileError param to FileSystemMountPointProvider::CreateFileSystemOperation function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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_context.h" 5 #include "webkit/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return NULL; 209 return NULL;
210 } 210 }
211 FileSystemMountPointProvider* mount_point_provider = 211 FileSystemMountPointProvider* mount_point_provider =
212 GetMountPointProvider(url.type()); 212 GetMountPointProvider(url.type());
213 if (!mount_point_provider) { 213 if (!mount_point_provider) {
214 if (error_code) 214 if (error_code)
215 *error_code = base::PLATFORM_FILE_ERROR_FAILED; 215 *error_code = base::PLATFORM_FILE_ERROR_FAILED;
216 return NULL; 216 return NULL;
217 } 217 }
218 218
219 PlatformFileError fs_error = base::PLATFORM_FILE_OK;
220 FileSystemOperation* operation =
221 mount_point_provider->CreateFileSystemOperation(url, this, &fs_error);
222
219 if (error_code) 223 if (error_code)
220 *error_code = base::PLATFORM_FILE_OK; 224 *error_code = fs_error;
221 return mount_point_provider->CreateFileSystemOperation(url, this); 225 return operation;
222 } 226 }
223 227
224 webkit_blob::FileStreamReader* FileSystemContext::CreateFileStreamReader( 228 webkit_blob::FileStreamReader* FileSystemContext::CreateFileStreamReader(
225 const FileSystemURL& url, 229 const FileSystemURL& url,
226 int64 offset) { 230 int64 offset) {
227 if (!url.is_valid()) 231 if (!url.is_valid())
228 return NULL; 232 return NULL;
229 FileSystemMountPointProvider* mount_point_provider = 233 FileSystemMountPointProvider* mount_point_provider =
230 GetMountPointProvider(url.type()); 234 GetMountPointProvider(url.type());
231 if (!mount_point_provider) 235 if (!mount_point_provider)
(...skipping 15 matching lines...) Expand all
247 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() && 251 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() &&
248 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) { 252 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) {
249 return; 253 return;
250 } 254 }
251 STLDeleteContainerPairSecondPointers(provider_map_.begin(), 255 STLDeleteContainerPairSecondPointers(provider_map_.begin(),
252 provider_map_.end()); 256 provider_map_.end());
253 delete this; 257 delete this;
254 } 258 }
255 259
256 } // namespace fileapi 260 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698