summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc26
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_unittest.cc10
2 files changed, 10 insertions, 26 deletions
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index b488d31..030bcf1 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -56,7 +56,7 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/webui/web_ui_util.h"
#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
+#include "webkit/browser/fileapi/file_system_operation_runner.h"
#include "webkit/browser/fileapi/local_file_system_operation.h"
#include "webkit/browser/fileapi/syncable/syncable_file_system_util.h"
#include "webkit/common/blob/shareable_file_reference.h"
@@ -848,15 +848,9 @@ void DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
GURL(origin_url),
project_path.BaseName()));
- base::PlatformFileError error_code;
- fileapi::FileSystemOperation* op =
- context_->CreateFileSystemOperation(url, &error_code);
-
- DCHECK(op);
-
- op->ReadDirectory(url, base::Bind(
- &DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
- ReadSyncFileSystemDirectoryCb, this, project_path));
+ context_->operation_runner()->ReadDirectory(
+ url, base::Bind(&DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
+ ReadSyncFileSystemDirectoryCb, this, project_path));
}
void DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
@@ -892,17 +886,7 @@ void DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
base::FilePath target_path = project_path;
target_path = target_path.Append(file_list[i].name);
- base::PlatformFileError error_code;
- fileapi::FileSystemOperation* op =
- context_->CreateFileSystemOperation(url, &error_code);
- DCHECK(op);
-
- if (error_code != base::PLATFORM_FILE_OK) {
- DLOG(ERROR) << "Error in copying files from sync filesystem.";
- return;
- }
-
- op->CreateSnapshotFile(
+ context_->operation_runner()->CreateSnapshotFile(
url,
base::Bind(
&DeveloperPrivateExportSyncfsFolderToLocalfsFunction::
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index 1cd540e..7474014 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -50,7 +50,7 @@
#include "webkit/browser/blob/blob_storage_controller.h"
#include "webkit/browser/blob/blob_url_request_job.h"
#include "webkit/browser/fileapi/file_system_context.h"
-#include "webkit/browser/fileapi/file_system_operation.h"
+#include "webkit/browser/fileapi/file_system_operation_runner.h"
#include "webkit/browser/fileapi/file_system_url.h"
#include "webkit/common/blob/blob_data.h"
@@ -793,13 +793,13 @@ class HTML5FileWriter {
&HTML5FileWriter::CreateFile, base::Unretained(this))));
}
- fileapi::FileSystemOperation* operation() {
- return fs_->CreateFileSystemOperation(fs_->CrackURL(GURL(root_)), NULL);
+ fileapi::FileSystemOperationRunner* operation_runner() {
+ return fs_->operation_runner();
}
void CreateFile() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- operation()->CreateFile(fs_->CrackURL(GURL(root_ + filename_)),
+ operation_runner()->CreateFile(fs_->CrackURL(GURL(root_ + filename_)),
kExclusive, base::Bind(
&HTML5FileWriter::CreateFileCallback, base::Unretained(this)));
}
@@ -811,7 +811,7 @@ class HTML5FileWriter {
url_request_context_.reset(new TestURLRequestContext(fs_));
url_request_context_->blob_storage_controller()
->AddFinishedBlob(blob_url(), blob_data_.get());
- operation()->Write(
+ operation_runner()->Write(
url_request_context_.get(),
fs_->CrackURL(GURL(root_ + filename_)),
blob_url(),