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

Unified Diff: webkit/fileapi/file_system_context.cc

Issue 13811013: Refactor FileSystemMountPointProvider::CreateFileStream{Reader,Writer} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: conflict fix Created 7 years, 8 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
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_context.cc
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index d0cefc8e9ea68491264f07c0151eefac7326c694..72558d9522434e606dfe2c76e5dacea702188a3a 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -8,8 +8,10 @@
#include "base/stl_util.h"
#include "base/single_thread_task_runner.h"
#include "googleurl/src/gurl.h"
+#include "webkit/blob/file_stream_reader.h"
#include "webkit/fileapi/copy_or_move_file_validator.h"
#include "webkit/fileapi/external_mount_points.h"
+#include "webkit/fileapi/file_stream_writer.h"
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_options.h"
@@ -291,29 +293,30 @@ FileSystemOperation* FileSystemContext::CreateFileSystemOperation(
return operation;
}
-webkit_blob::FileStreamReader* FileSystemContext::CreateFileStreamReader(
+scoped_ptr<webkit_blob::FileStreamReader>
+FileSystemContext::CreateFileStreamReader(
const FileSystemURL& url,
int64 offset,
const base::Time& expected_modification_time) {
if (!url.is_valid())
- return NULL;
+ return scoped_ptr<webkit_blob::FileStreamReader>();
FileSystemMountPointProvider* mount_point_provider =
GetMountPointProvider(url.type());
if (!mount_point_provider)
- return NULL;
+ return scoped_ptr<webkit_blob::FileStreamReader>();
return mount_point_provider->CreateFileStreamReader(
url, offset, expected_modification_time, this);
}
-FileStreamWriter* FileSystemContext::CreateFileStreamWriter(
+scoped_ptr<FileStreamWriter> FileSystemContext::CreateFileStreamWriter(
const FileSystemURL& url,
int64 offset) {
if (!url.is_valid())
- return NULL;
+ return scoped_ptr<FileStreamWriter>();
FileSystemMountPointProvider* mount_point_provider =
GetMountPointProvider(url.type());
if (!mount_point_provider)
- return NULL;
+ return scoped_ptr<FileStreamWriter>();
return mount_point_provider->CreateFileStreamWriter(url, offset, this);
}
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698