Chromium Code Reviews| Index: content/browser/fileapi/fileapi_message_filter.cc |
| diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc |
| index 98deb77abb59b49aec33b146ac3d1821c228a470..b20fd9618c4cbbb6b02bf038940fd8ed0dd184fe 100644 |
| --- a/content/browser/fileapi/fileapi_message_filter.cc |
| +++ b/content/browser/fileapi/fileapi_message_filter.cc |
| @@ -34,7 +34,6 @@ |
| #include "webkit/browser/fileapi/file_permission_policy.h" |
| #include "webkit/browser/fileapi/file_system_context.h" |
| #include "webkit/browser/fileapi/isolated_context.h" |
| -#include "webkit/browser/quota/quota_manager.h" |
| #include "webkit/common/blob/blob_data.h" |
| #include "webkit/common/blob/shareable_file_reference.h" |
| #include "webkit/common/fileapi/directory_entry.h" |
| @@ -42,17 +41,10 @@ |
| #include "webkit/common/fileapi/file_system_types.h" |
| #include "webkit/common/fileapi/file_system_util.h" |
| -#if defined(ENABLE_PLUGINS) |
| -#include "content/browser/renderer_host/pepper/pepper_security_helper.h" |
| -#include "ppapi/shared_impl/file_type_conversion.h" |
| -#endif // defined(ENABLE_PLUGINS) |
| - |
| using fileapi::FileSystemFileUtil; |
| using fileapi::FileSystemBackend; |
| using fileapi::FileSystemOperation; |
| using fileapi::FileSystemURL; |
| -using fileapi::FileUpdateObserver; |
| -using fileapi::UpdateObserverList; |
| using webkit_blob::BlobData; |
| using webkit_blob::BlobStorageContext; |
| using webkit_blob::BlobStorageHost; |
| @@ -181,16 +173,11 @@ bool FileAPIMessageFilter::OnMessageReceived( |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_Truncate, OnTruncate) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_TouchFile, OnTouchFile) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_CancelWrite, OnCancel) |
| -#if defined(ENABLE_PLUGINS) |
| - IPC_MESSAGE_HANDLER(FileSystemHostMsg_OpenPepperFile, OnOpenPepperFile) |
| -#endif // defined(ENABLE_PLUGINS) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_NotifyCloseFile, OnNotifyCloseFile) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_CreateSnapshotFile, |
| OnCreateSnapshotFile) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_DidReceiveSnapshotFile, |
| OnDidReceiveSnapshotFile) |
| - IPC_MESSAGE_HANDLER(FileSystemHostMsg_WillUpdate, OnWillUpdate) |
| - IPC_MESSAGE_HANDLER(FileSystemHostMsg_DidUpdate, OnDidUpdate) |
| IPC_MESSAGE_HANDLER(FileSystemHostMsg_SyncGetPlatformPath, |
| OnSyncGetPlatformPath) |
| IPC_MESSAGE_HANDLER(BlobHostMsg_StartBuilding, OnStartBuildingBlob) |
| @@ -513,46 +500,6 @@ void FileAPIMessageFilter::OnCancel( |
| } |
| } |
| -#if defined(ENABLE_PLUGINS) |
| -void FileAPIMessageFilter::OnOpenPepperFile( |
| - int request_id, const GURL& path, int pp_open_flags) { |
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| -FileSystemURL url(context_->CrackURL(path)); |
| - if (!ValidateFileSystemURL(request_id, url)) |
| - return; |
| - if (!CanOpenFileSystemURLWithPepperFlags(pp_open_flags, process_id_, url)) { |
| - Send(new FileSystemMsg_DidFail( |
| - request_id, base::PLATFORM_FILE_ERROR_SECURITY)); |
| - return; |
| - } |
| - |
| - quota::QuotaLimitType quota_policy = quota::kQuotaLimitTypeUnknown; |
| - quota::QuotaManagerProxy* quota_manager_proxy = |
| - context_->quota_manager_proxy(); |
| - CHECK(quota_manager_proxy); |
| - CHECK(quota_manager_proxy->quota_manager()); |
| - |
| - if (quota_manager_proxy->quota_manager()->IsStorageUnlimited( |
| - url.origin(), FileSystemTypeToQuotaStorageType(url.type()))) { |
| - quota_policy = quota::kQuotaLimitTypeUnlimited; |
| - } else { |
| - quota_policy = quota::kQuotaLimitTypeLimited; |
| - } |
| - |
| - int platform_file_flags = 0; |
| - if (!ppapi::PepperFileOpenFlagsToPlatformFileFlags(pp_open_flags, |
| - &platform_file_flags)) { |
| - // |pp_open_flags| should have already been checked in PepperFileIOHost. |
| - NOTREACHED() << "Open file request with invalid pp_open_flags ignored."; |
| - } |
| - |
| - operations_[request_id] = operation_runner()->OpenFile( |
| - url, platform_file_flags, PeerHandle(), |
| - base::Bind(&FileAPIMessageFilter::DidOpenFile, this, request_id, |
| - quota_policy)); |
| -} |
| -#endif // defined(ENABLE_PLUGINS) |
| - |
| void FileAPIMessageFilter::OnNotifyCloseFile(int file_open_id) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| @@ -566,31 +513,6 @@ void FileAPIMessageFilter::OnNotifyCloseFile(int file_open_id) { |
| } |
|
kinuko
2013/10/23 07:16:04
This logic can be probably removed (and we need to
teravest
2013/10/23 16:54:27
Done.
|
| } |
| -void FileAPIMessageFilter::OnWillUpdate(const GURL& path) { |
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| - FileSystemURL url(context_->CrackURL(path)); |
| - if (!url.is_valid()) |
| - return; |
| - const UpdateObserverList* observers = |
| - context_->GetUpdateObservers(url.type()); |
| - if (!observers) |
| - return; |
| - observers->Notify(&FileUpdateObserver::OnStartUpdate, MakeTuple(url)); |
| -} |
| - |
| -void FileAPIMessageFilter::OnDidUpdate(const GURL& path, int64 delta) { |
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| - FileSystemURL url(context_->CrackURL(path)); |
| - if (!url.is_valid()) |
| - return; |
| - const UpdateObserverList* observers = |
| - context_->GetUpdateObservers(url.type()); |
| - if (!observers) |
| - return; |
| - observers->Notify(&FileUpdateObserver::OnUpdate, MakeTuple(url, delta)); |
| - observers->Notify(&FileUpdateObserver::OnEndUpdate, MakeTuple(url)); |
| -} |
| - |
| void FileAPIMessageFilter::OnSyncGetPlatformPath( |
| const GURL& path, base::FilePath* platform_path) { |
| SyncGetPlatformPath(context_, process_id_, path, platform_path); |