| Index: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
|
| diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
|
| index acebdc058b7c1ee97e62469b08c9e18831207e5a..e6bb064c8f5bedcba28b37fe5844ed73ad981916 100644
|
| --- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
|
| +++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
|
| @@ -22,11 +22,11 @@
|
| #include "ppapi/proxy/ppapi_messages.h"
|
| #include "ppapi/shared_impl/file_system_util.h"
|
| #include "ppapi/shared_impl/file_type_conversion.h"
|
| -#include "webkit/browser/fileapi/file_system_operation_runner.h"
|
| -#include "webkit/browser/fileapi/isolated_context.h"
|
| -#include "webkit/browser/quota/quota_manager_proxy.h"
|
| -#include "webkit/common/fileapi/file_system_util.h"
|
| -#include "webkit/common/quota/quota_types.h"
|
| +#include "storage/browser/fileapi/file_system_operation_runner.h"
|
| +#include "storage/browser/fileapi/isolated_context.h"
|
| +#include "storage/browser/quota/quota_manager_proxy.h"
|
| +#include "storage/common/fileapi/file_system_util.h"
|
| +#include "storage/common/quota/quota_types.h"
|
|
|
| namespace content {
|
|
|
| @@ -35,7 +35,7 @@ namespace {
|
| // This is the minimum amount of quota we reserve per file system.
|
| const int64_t kMinimumQuotaReservationSize = 1024 * 1024; // 1 MB
|
|
|
| -scoped_refptr<fileapi::FileSystemContext> GetFileSystemContextFromRenderId(
|
| +scoped_refptr<storage::FileSystemContext> GetFileSystemContextFromRenderId(
|
| int render_process_id) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| RenderProcessHost* host = RenderProcessHost::FromID(render_process_id);
|
| @@ -118,7 +118,7 @@ bool PepperFileSystemBrowserHost::IsFileSystemHost() { return true; }
|
|
|
| void PepperFileSystemBrowserHost::OpenQuotaFile(
|
| PepperFileIOHost* file_io_host,
|
| - const fileapi::FileSystemURL& url,
|
| + const storage::FileSystemURL& url,
|
| const OpenQuotaFileCallback& callback) {
|
| int32_t id = file_io_host->pp_resource();
|
| std::pair<FileMap::iterator, bool> insert_result =
|
| @@ -163,9 +163,9 @@ int32_t PepperFileSystemBrowserHost::OnHostMsgOpen(
|
| return PP_ERROR_INPROGRESS;
|
| called_open_ = true;
|
|
|
| - fileapi::FileSystemType file_system_type =
|
| + storage::FileSystemType file_system_type =
|
| PepperFileSystemTypeToFileSystemType(type_);
|
| - if (file_system_type == fileapi::kFileSystemTypeUnknown)
|
| + if (file_system_type == storage::kFileSystemTypeUnknown)
|
| return PP_ERROR_FAILED;
|
|
|
| int render_process_id = 0;
|
| @@ -188,7 +188,7 @@ int32_t PepperFileSystemBrowserHost::OnHostMsgOpen(
|
|
|
| void PepperFileSystemBrowserHost::OpenExistingFileSystem(
|
| const base::Closure& callback,
|
| - scoped_refptr<fileapi::FileSystemContext> file_system_context) {
|
| + scoped_refptr<storage::FileSystemContext> file_system_context) {
|
| if (file_system_context.get()) {
|
| opened_ = true;
|
| } else {
|
| @@ -207,8 +207,8 @@ void PepperFileSystemBrowserHost::OpenExistingFileSystem(
|
|
|
| void PepperFileSystemBrowserHost::OpenFileSystem(
|
| ppapi::host::ReplyMessageContext reply_context,
|
| - fileapi::FileSystemType file_system_type,
|
| - scoped_refptr<fileapi::FileSystemContext> file_system_context) {
|
| + storage::FileSystemType file_system_type,
|
| + scoped_refptr<storage::FileSystemContext> file_system_context) {
|
| if (!file_system_context.get()) {
|
| OpenFileSystemComplete(
|
| reply_context, GURL(), std::string(), base::File::FILE_ERROR_FAILED);
|
| @@ -222,7 +222,7 @@ void PepperFileSystemBrowserHost::OpenFileSystem(
|
| file_system_context_->OpenFileSystem(
|
| origin,
|
| file_system_type,
|
| - fileapi::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
| + storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
| base::Bind(&PepperFileSystemBrowserHost::OpenFileSystemComplete,
|
| weak_factory_.GetWeakPtr(),
|
| reply_context));
|
| @@ -254,14 +254,14 @@ void PepperFileSystemBrowserHost::OpenIsolatedFileSystem(
|
| ppapi::host::ReplyMessageContext reply_context,
|
| const std::string& fsid,
|
| PP_IsolatedFileSystemType_Private type,
|
| - scoped_refptr<fileapi::FileSystemContext> file_system_context) {
|
| + scoped_refptr<storage::FileSystemContext> file_system_context) {
|
| if (!file_system_context.get()) {
|
| SendReplyForIsolatedFileSystem(reply_context, fsid, PP_ERROR_FAILED);
|
| return;
|
| }
|
| SetFileSystemContext(file_system_context);
|
|
|
| - root_url_ = GURL(fileapi::GetIsolatedFileSystemRootURIString(
|
| + root_url_ = GURL(storage::GetIsolatedFileSystemRootURIString(
|
| browser_ppapi_host_->GetDocumentURLForInstance(pp_instance()).GetOrigin(),
|
| fsid,
|
| ppapi::IsolatedFileSystemTypeToRootName(type)));
|
| @@ -288,7 +288,7 @@ void PepperFileSystemBrowserHost::OpenIsolatedFileSystem(
|
| void PepperFileSystemBrowserHost::OpenPluginPrivateFileSystem(
|
| ppapi::host::ReplyMessageContext reply_context,
|
| const std::string& fsid,
|
| - scoped_refptr<fileapi::FileSystemContext> file_system_context) {
|
| + scoped_refptr<storage::FileSystemContext> file_system_context) {
|
| GURL origin =
|
| browser_ppapi_host_->GetDocumentURLForInstance(pp_instance()).GetOrigin();
|
| if (!origin.is_valid()) {
|
| @@ -304,10 +304,10 @@ void PepperFileSystemBrowserHost::OpenPluginPrivateFileSystem(
|
|
|
| file_system_context->OpenPluginPrivateFileSystem(
|
| origin,
|
| - fileapi::kFileSystemTypePluginPrivate,
|
| + storage::kFileSystemTypePluginPrivate,
|
| fsid,
|
| plugin_id,
|
| - fileapi::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
| + storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT,
|
| base::Bind(
|
| &PepperFileSystemBrowserHost::OpenPluginPrivateFileSystemComplete,
|
| weak_factory_.GetWeakPtr(),
|
| @@ -335,18 +335,18 @@ int32_t PepperFileSystemBrowserHost::OnHostMsgInitIsolatedFileSystem(
|
| called_open_ = true;
|
|
|
| // Do a sanity check.
|
| - if (!fileapi::ValidateIsolatedFileSystemId(fsid))
|
| + if (!storage::ValidateIsolatedFileSystemId(fsid))
|
| return PP_ERROR_BADARGUMENT;
|
|
|
| int render_process_id = 0;
|
| int unused;
|
| if (!browser_ppapi_host_->GetRenderFrameIDsForInstance(
|
| pp_instance(), &render_process_id, &unused)) {
|
| - fileapi::IsolatedContext::GetInstance()->RevokeFileSystem(fsid);
|
| + storage::IsolatedContext::GetInstance()->RevokeFileSystem(fsid);
|
| return PP_ERROR_FAILED;
|
| }
|
|
|
| - root_url_ = GURL(fileapi::GetIsolatedFileSystemRootURIString(
|
| + root_url_ = GURL(storage::GetIsolatedFileSystemRootURIString(
|
| browser_ppapi_host_->GetDocumentURLForInstance(pp_instance()).GetOrigin(),
|
| fsid,
|
| ppapi::IsolatedFileSystemTypeToRootName(type)));
|
| @@ -401,14 +401,14 @@ void PepperFileSystemBrowserHost::SendReplyForIsolatedFileSystem(
|
| const std::string& fsid,
|
| int32_t error) {
|
| if (error != PP_OK)
|
| - fileapi::IsolatedContext::GetInstance()->RevokeFileSystem(fsid);
|
| + storage::IsolatedContext::GetInstance()->RevokeFileSystem(fsid);
|
| reply_context.params.set_result(error);
|
| host()->SendReply(reply_context,
|
| PpapiPluginMsg_FileSystem_InitIsolatedFileSystemReply());
|
| }
|
|
|
| void PepperFileSystemBrowserHost::SetFileSystemContext(
|
| - scoped_refptr<fileapi::FileSystemContext> file_system_context) {
|
| + scoped_refptr<storage::FileSystemContext> file_system_context) {
|
| file_system_context_ = file_system_context;
|
| if (type_ != PP_FILESYSTEMTYPE_EXTERNAL || root_url_.is_valid()) {
|
| file_system_operation_runner_ =
|
| @@ -426,11 +426,11 @@ bool PepperFileSystemBrowserHost::ShouldCreateQuotaReservation() const {
|
| file_system_context_->quota_manager_proxy();
|
| CHECK(quota_manager_proxy);
|
| CHECK(quota_manager_proxy->quota_manager());
|
| - fileapi::FileSystemType file_system_type =
|
| + storage::FileSystemType file_system_type =
|
| PepperFileSystemTypeToFileSystemType(type_);
|
| return !quota_manager_proxy->quota_manager()->IsStorageUnlimited(
|
| root_url_.GetOrigin(),
|
| - fileapi::FileSystemTypeToQuotaStorageType(file_system_type));
|
| + storage::FileSystemTypeToQuotaStorageType(file_system_type));
|
| }
|
|
|
| void PepperFileSystemBrowserHost::CreateQuotaReservation(
|
|
|