diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-09 14:14:12 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-09 14:14:12 +0000 |
commit | 3a7bf22aaf7dd1d9ed4671f4b5859d8b7e86542c (patch) | |
tree | 4e2a8e2967b61849ab1d7742bc87dc80734dd29d /content/browser/fileapi | |
parent | 770d6a89638d340c3bad7970614923dc17e54d8c (diff) | |
download | chromium_src-3a7bf22aaf7dd1d9ed4671f4b5859d8b7e86542c.zip chromium_src-3a7bf22aaf7dd1d9ed4671f4b5859d8b7e86542c.tar.gz chromium_src-3a7bf22aaf7dd1d9ed4671f4b5859d8b7e86542c.tar.bz2 |
Replace all CreateFileSystemOperation with FileSystemOperationRunner
FileSystemOperation consumers should no longer worry about
Operation memory leak.
BUG=176444
TEST=existing tests
R=benjhayden@chromium.org, kinaba@chromium.org, thestig@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/16452002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/fileapi')
-rw-r--r-- | content/browser/fileapi/browser_file_system_helper.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc index 9e995f4..e1f694a 100644 --- a/content/browser/fileapi/browser_file_system_helper.cc +++ b/content/browser/fileapi/browser_file_system_helper.cc @@ -18,9 +18,9 @@ #include "content/public/common/url_constants.h" #include "webkit/browser/fileapi/external_mount_points.h" #include "webkit/browser/fileapi/file_permission_policy.h" +#include "webkit/browser/fileapi/file_system_operation_runner.h" #include "webkit/browser/fileapi/file_system_options.h" #include "webkit/browser/fileapi/file_system_task_runners.h" -#include "webkit/browser/fileapi/local_file_system_operation.h" #include "webkit/browser/fileapi/sandbox_mount_point_provider.h" #include "webkit/browser/quota/quota_manager.h" @@ -146,19 +146,7 @@ void SyncGetPlatformPath(fileapi::FileSystemContext* context, context, process_id, url, fileapi::kReadFilePermissions, &error)) return; - // This is called only by pepper plugin as of writing to get the - // underlying platform path to upload a file in the sandboxed filesystem - // (e.g. TEMPORARY or PERSISTENT). - // TODO(kinuko): this hack should go away once appropriate upload-stream - // handling based on element types is supported. - fileapi::LocalFileSystemOperation* operation = - context->CreateFileSystemOperation( - url, NULL)->AsLocalFileSystemOperation(); - DCHECK(operation); - if (!operation) - return; - - operation->SyncGetPlatformPath(url, platform_path); + context->operation_runner()->SyncGetPlatformPath(url, platform_path); // The path is to be attached to URLLoader so we grant read permission // for the file. (We first need to check if it can already be read not to |