diff options
author | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 20:42:57 +0000 |
---|---|---|
committer | ericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-07 20:42:57 +0000 |
commit | 08a0e0a77ac18f7591e225d28692116e40f3ee38 (patch) | |
tree | 4435746f6f5de245ed46032cc042f64221174399 /content | |
parent | d1998d3a1171a4d5a1c6a1756ba75297d0f64a99 (diff) | |
download | chromium_src-08a0e0a77ac18f7591e225d28692116e40f3ee38.zip chromium_src-08a0e0a77ac18f7591e225d28692116e40f3ee38.tar.gz chromium_src-08a0e0a77ac18f7591e225d28692116e40f3ee38.tar.bz2 |
Revert 80833 - More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, wherepossible without WebKit API changes. The WebKit changes will happen in anotherCL.BUG=noneTEST=noneReview URL: http://codereview.chromium.org/6767010
TBR=ericu@google.com
Review URL: http://codereview.chromium.org/6813025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
12 files changed, 108 insertions, 111 deletions
diff --git a/content/browser/file_system/file_system_dispatcher_host.cc b/content/browser/file_system/file_system_dispatcher_host.cc index 053d31a4..a5677da 100644 --- a/content/browser/file_system/file_system_dispatcher_host.cc +++ b/content/browser/file_system/file_system_dispatcher_host.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -57,10 +57,9 @@ class BrowserFileSystemCallbackDispatcher } virtual void DidOpenFileSystem(const std::string& name, - const GURL& root) { + const FilePath& path) { dispatcher_host_->Send( - new FileSystemMsg_OpenComplete( - request_id_, root.is_valid(), name, root)); + new FileSystemMsg_OpenComplete(request_id_, !path.empty(), name, path)); } virtual void DidFail(base::PlatformFileError error_code) { @@ -138,7 +137,7 @@ void FileSystemDispatcherHost::OnOpen( // TODO(kinuko): Need to notify the UI thread to indicate that // there's a blocked content. Send(new FileSystemMsg_OpenComplete( - request_id, false, std::string(), GURL())); + request_id, false, std::string(), FilePath())); return; } @@ -146,27 +145,27 @@ void FileSystemDispatcherHost::OnOpen( } void FileSystemDispatcherHost::OnMove( - int request_id, const GURL& src_path, const GURL& dest_path) { + int request_id, const FilePath& src_path, const FilePath& dest_path) { GetNewOperation(request_id)->Move(src_path, dest_path); } void FileSystemDispatcherHost::OnCopy( - int request_id, const GURL& src_path, const GURL& dest_path) { + int request_id, const FilePath& src_path, const FilePath& dest_path) { GetNewOperation(request_id)->Copy(src_path, dest_path); } void FileSystemDispatcherHost::OnRemove( - int request_id, const GURL& path, bool recursive) { + int request_id, const FilePath& path, bool recursive) { GetNewOperation(request_id)->Remove(path, recursive); } void FileSystemDispatcherHost::OnReadMetadata( - int request_id, const GURL& path) { + int request_id, const FilePath& path) { GetNewOperation(request_id)->GetMetadata(path); } void FileSystemDispatcherHost::OnCreate( - int request_id, const GURL& path, bool exclusive, + int request_id, const FilePath& path, bool exclusive, bool is_directory, bool recursive) { if (is_directory) GetNewOperation(request_id)->CreateDirectory(path, exclusive, recursive); @@ -175,7 +174,7 @@ void FileSystemDispatcherHost::OnCreate( } void FileSystemDispatcherHost::OnExists( - int request_id, const GURL& path, bool is_directory) { + int request_id, const FilePath& path, bool is_directory) { if (is_directory) GetNewOperation(request_id)->DirectoryExists(path); else @@ -183,13 +182,13 @@ void FileSystemDispatcherHost::OnExists( } void FileSystemDispatcherHost::OnReadDirectory( - int request_id, const GURL& path) { + int request_id, const FilePath& path) { GetNewOperation(request_id)->ReadDirectory(path); } void FileSystemDispatcherHost::OnWrite( int request_id, - const GURL& path, + const FilePath& path, const GURL& blob_url, int64 offset) { GetNewOperation(request_id)->Write( @@ -198,14 +197,14 @@ void FileSystemDispatcherHost::OnWrite( void FileSystemDispatcherHost::OnTruncate( int request_id, - const GURL& path, + const FilePath& path, int64 length) { GetNewOperation(request_id)->Truncate(path, length); } void FileSystemDispatcherHost::OnTouchFile( int request_id, - const GURL& path, + const FilePath& path, const base::Time& last_access_time, const base::Time& last_modified_time) { GetNewOperation(request_id)->TouchFile( diff --git a/content/browser/file_system/file_system_dispatcher_host.h b/content/browser/file_system/file_system_dispatcher_host.h index a0b8474..8e22b45 100644 --- a/content/browser/file_system/file_system_dispatcher_host.h +++ b/content/browser/file_system/file_system_dispatcher_host.h @@ -17,6 +17,7 @@ class Time; } class ChromeURLRequestContext; +class FilePath; class GURL; class HostContentSettingsMap; class Profile; @@ -55,27 +56,27 @@ class FileSystemDispatcherHost : public BrowserMessageFilter { int64 requested_size, bool create); void OnMove(int request_id, - const GURL& src_path, - const GURL& dest_path); + const FilePath& src_path, + const FilePath& dest_path); void OnCopy(int request_id, - const GURL& src_path, - const GURL& dest_path); - void OnRemove(int request_id, const GURL& path, bool recursive); - void OnReadMetadata(int request_id, const GURL& path); + const FilePath& src_path, + const FilePath& dest_path); + void OnRemove(int request_id, const FilePath& path, bool recursive); + void OnReadMetadata(int request_id, const FilePath& path); void OnCreate(int request_id, - const GURL& path, + const FilePath& path, bool exclusive, bool is_directory, bool recursive); - void OnExists(int request_id, const GURL& path, bool is_directory); - void OnReadDirectory(int request_id, const GURL& path); + void OnExists(int request_id, const FilePath& path, bool is_directory); + void OnReadDirectory(int request_id, const FilePath& path); void OnWrite(int request_id, - const GURL& path, + const FilePath& path, const GURL& blob_url, int64 offset); - void OnTruncate(int request_id, const GURL& path, int64 length); + void OnTruncate(int request_id, const FilePath& path, int64 length); void OnTouchFile(int request_id, - const GURL& path, + const FilePath& path, const base::Time& last_access_time, const base::Time& last_modified_time); void OnCancel(int request_id, int request_to_cancel); diff --git a/content/common/file_system/file_system_dispatcher.cc b/content/common/file_system/file_system_dispatcher.cc index c4fe701..d95a5b7 100644 --- a/content/common/file_system/file_system_dispatcher.cc +++ b/content/common/file_system/file_system_dispatcher.cc @@ -52,8 +52,8 @@ bool FileSystemDispatcher::OpenFileSystem( } bool FileSystemDispatcher::Move( - const GURL& src_path, - const GURL& dest_path, + const FilePath& src_path, + const FilePath& dest_path, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); if (!ChildThread::current()->Send(new FileSystemHostMsg_Move( @@ -66,8 +66,8 @@ bool FileSystemDispatcher::Move( } bool FileSystemDispatcher::Copy( - const GURL& src_path, - const GURL& dest_path, + const FilePath& src_path, + const FilePath& dest_path, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); if (!ChildThread::current()->Send(new FileSystemHostMsg_Copy( @@ -80,7 +80,7 @@ bool FileSystemDispatcher::Copy( } bool FileSystemDispatcher::Remove( - const GURL& path, + const FilePath& path, bool recursive, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); @@ -94,7 +94,7 @@ bool FileSystemDispatcher::Remove( } bool FileSystemDispatcher::ReadMetadata( - const GURL& path, + const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); if (!ChildThread::current()->Send( @@ -107,7 +107,7 @@ bool FileSystemDispatcher::ReadMetadata( } bool FileSystemDispatcher::Create( - const GURL& path, + const FilePath& path, bool exclusive, bool is_directory, bool recursive, @@ -123,7 +123,7 @@ bool FileSystemDispatcher::Create( } bool FileSystemDispatcher::Exists( - const GURL& path, + const FilePath& path, bool is_directory, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); @@ -137,7 +137,7 @@ bool FileSystemDispatcher::Exists( } bool FileSystemDispatcher::ReadDirectory( - const GURL& path, + const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher) { int request_id = dispatchers_.Add(dispatcher); if (!ChildThread::current()->Send( @@ -150,7 +150,7 @@ bool FileSystemDispatcher::ReadDirectory( } bool FileSystemDispatcher::Truncate( - const GURL& path, + const FilePath& path, int64 offset, int* request_id_out, fileapi::FileSystemCallbackDispatcher* dispatcher) { @@ -167,7 +167,7 @@ bool FileSystemDispatcher::Truncate( } bool FileSystemDispatcher::Write( - const GURL& path, + const FilePath& path, const GURL& blob_url, int64 offset, int* request_id_out, @@ -198,7 +198,7 @@ bool FileSystemDispatcher::Cancel( } bool FileSystemDispatcher::TouchFile( - const GURL& path, + const FilePath& path, const base::Time& last_access_time, const base::Time& last_modified_time, fileapi::FileSystemCallbackDispatcher* dispatcher) { @@ -215,12 +215,12 @@ bool FileSystemDispatcher::TouchFile( void FileSystemDispatcher::OnOpenComplete( int request_id, bool accepted, const std::string& name, - const GURL& root) { + const FilePath& root_path) { fileapi::FileSystemCallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); DCHECK(dispatcher); if (accepted) - dispatcher->DidOpenFileSystem(name, root); + dispatcher->DidOpenFileSystem(name, root_path); else dispatcher->DidFail(base::PLATFORM_FILE_ERROR_SECURITY); dispatchers_.Remove(request_id); diff --git a/content/common/file_system/file_system_dispatcher.h b/content/common/file_system/file_system_dispatcher.h index b898eae..e61a518 100644 --- a/content/common/file_system/file_system_dispatcher.h +++ b/content/common/file_system/file_system_dispatcher.h @@ -38,39 +38,39 @@ class FileSystemDispatcher : public IPC::Channel::Listener { long long size, bool create, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Move(const GURL& src_path, - const GURL& dest_path, + bool Move(const FilePath& src_path, + const FilePath& dest_path, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Copy(const GURL& src_path, - const GURL& dest_path, + bool Copy(const FilePath& src_path, + const FilePath& dest_path, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Remove(const GURL& path, + bool Remove(const FilePath& path, bool recursive, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool ReadMetadata(const GURL& path, + bool ReadMetadata(const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Create(const GURL& path, + bool Create(const FilePath& path, bool exclusive, bool is_directory, bool recursive, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Exists(const GURL& path, + bool Exists(const FilePath& path, bool for_directory, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool ReadDirectory(const GURL& path, + bool ReadDirectory(const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Truncate(const GURL& path, + bool Truncate(const FilePath& path, int64 offset, int* request_id_out, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool Write(const GURL& path, + bool Write(const FilePath& path, const GURL& blob_url, int64 offset, int* request_id_out, fileapi::FileSystemCallbackDispatcher* dispatcher); bool Cancel(int request_id_to_cancel, fileapi::FileSystemCallbackDispatcher* dispatcher); - bool TouchFile(const GURL& file_path, + bool TouchFile(const FilePath& file_path, const base::Time& last_access_time, const base::Time& last_modified_time, fileapi::FileSystemCallbackDispatcher* dispatcher); @@ -81,7 +81,7 @@ class FileSystemDispatcher : public IPC::Channel::Listener { int request_id, bool accepted, const std::string& name, - const GURL& root); + const FilePath& root_path); void OnDidSucceed(int request_id); void OnDidReadMetadata(int request_id, const base::PlatformFileInfo& file_info, diff --git a/content/common/file_system/webfilesystem_callback_dispatcher.cc b/content/common/file_system/webfilesystem_callback_dispatcher.cc index c59e377..6903f4c 100644 --- a/content/common/file_system/webfilesystem_callback_dispatcher.cc +++ b/content/common/file_system/webfilesystem_callback_dispatcher.cc @@ -10,7 +10,6 @@ #include "base/file_util_proxy.h" #include "base/logging.h" #include "base/utf_string_conversions.h" -#include "googleurl/src/gurl.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h" @@ -59,9 +58,9 @@ void WebFileSystemCallbackDispatcher::DidReadDirectory( } void WebFileSystemCallbackDispatcher::DidOpenFileSystem( - const std::string& name, const GURL& root) { - callbacks_->didOpenFileSystem( - UTF8ToUTF16(name), UTF8ToUTF16(root.spec())); + const std::string& name, const FilePath& root_path) { + callbacks_->didOpenFileSystem(UTF8ToUTF16(name), + webkit_glue::FilePathToWebString(root_path)); } void WebFileSystemCallbackDispatcher::DidFail( diff --git a/content/common/file_system/webfilesystem_callback_dispatcher.h b/content/common/file_system/webfilesystem_callback_dispatcher.h index b8c1aac..80bd183 100644 --- a/content/common/file_system/webfilesystem_callback_dispatcher.h +++ b/content/common/file_system/webfilesystem_callback_dispatcher.h @@ -9,8 +9,6 @@ #include "base/platform_file.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" -class GURL; - namespace WebKit { class WebFileSystemCallbacks; } @@ -30,7 +28,7 @@ class WebFileSystemCallbackDispatcher const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more); virtual void DidOpenFileSystem(const std::string&, - const GURL&); + const FilePath&); virtual void DidFail(base::PlatformFileError); virtual void DidWrite(int64 bytes, bool complete); diff --git a/content/common/file_system/webfilesystem_impl.cc b/content/common/file_system/webfilesystem_impl.cc index 38f1d2a..43b78f3 100644 --- a/content/common/file_system/webfilesystem_impl.cc +++ b/content/common/file_system/webfilesystem_impl.cc @@ -27,8 +27,8 @@ void WebFileSystemImpl::move(const WebString& src_path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Move(GURL(src_path), - GURL(dest_path), + dispatcher->Move(webkit_glue::WebStringToFilePath(src_path), + webkit_glue::WebStringToFilePath(dest_path), new WebFileSystemCallbackDispatcher(callbacks)); } @@ -37,8 +37,8 @@ void WebFileSystemImpl::copy(const WebString& src_path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Copy(GURL(src_path), - GURL(dest_path), + dispatcher->Copy(webkit_glue::WebStringToFilePath(src_path), + webkit_glue::WebStringToFilePath(dest_path), new WebFileSystemCallbackDispatcher(callbacks)); } @@ -46,7 +46,7 @@ void WebFileSystemImpl::remove(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Remove(GURL(path), + dispatcher->Remove(webkit_glue::WebStringToFilePath(path), false /* recursive */, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -55,7 +55,7 @@ void WebFileSystemImpl::removeRecursively(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Remove(GURL(path), + dispatcher->Remove(webkit_glue::WebStringToFilePath(path), true /* recursive */, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -64,7 +64,7 @@ void WebFileSystemImpl::readMetadata(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->ReadMetadata(GURL(path), + dispatcher->ReadMetadata(webkit_glue::WebStringToFilePath(path), new WebFileSystemCallbackDispatcher(callbacks)); } @@ -73,7 +73,7 @@ void WebFileSystemImpl::createFile(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Create(GURL(path), exclusive, false, + dispatcher->Create(webkit_glue::WebStringToFilePath(path), exclusive, false, false, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -82,7 +82,7 @@ void WebFileSystemImpl::createDirectory(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Create(GURL(path), exclusive, true, + dispatcher->Create(webkit_glue::WebStringToFilePath(path), exclusive, true, false, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -90,7 +90,7 @@ void WebFileSystemImpl::fileExists(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Exists(GURL(path), false, + dispatcher->Exists(webkit_glue::WebStringToFilePath(path), false, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -98,7 +98,7 @@ void WebFileSystemImpl::directoryExists(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->Exists(GURL(path), true, + dispatcher->Exists(webkit_glue::WebStringToFilePath(path), true, new WebFileSystemCallbackDispatcher(callbacks)); } @@ -106,11 +106,11 @@ void WebFileSystemImpl::readDirectory(const WebString& path, WebFileSystemCallbacks* callbacks) { FileSystemDispatcher* dispatcher = ChildThread::current()->file_system_dispatcher(); - dispatcher->ReadDirectory(GURL(path), + dispatcher->ReadDirectory(webkit_glue::WebStringToFilePath(path), new WebFileSystemCallbackDispatcher(callbacks)); } WebKit::WebFileWriter* WebFileSystemImpl::createFileWriter( const WebString& path, WebKit::WebFileWriterClient* client) { - return new WebFileWriterImpl(GURL(path), client); + return new WebFileWriterImpl(path, client); } diff --git a/content/common/file_system/webfilewriter_impl.cc b/content/common/file_system/webfilewriter_impl.cc index d42caa5..196b9ec 100644 --- a/content/common/file_system/webfilewriter_impl.cc +++ b/content/common/file_system/webfilewriter_impl.cc @@ -32,7 +32,7 @@ class WebFileWriterImpl::CallbackDispatcher NOTREACHED(); } virtual void DidOpenFileSystem(const std::string& name, - const GURL& root) { + const FilePath& root_path) { NOTREACHED(); } virtual void DidSucceed() { @@ -53,7 +53,7 @@ class WebFileWriterImpl::CallbackDispatcher }; WebFileWriterImpl::WebFileWriterImpl( - const GURL& path, WebKit::WebFileWriterClient* client) + const WebKit::WebString& path, WebKit::WebFileWriterClient* client) : WebFileWriterBase(path, client), request_id_(0) { } @@ -61,17 +61,16 @@ WebFileWriterImpl::WebFileWriterImpl( WebFileWriterImpl::~WebFileWriterImpl() { } -void WebFileWriterImpl::DoTruncate(const GURL& path, int64 offset) { +void WebFileWriterImpl::DoTruncate(const FilePath& path, int64 offset) { // The FileSystemDispatcher takes ownership of the CallbackDispatcher. GetFileSystemDispatcher()->Truncate(path, offset, &request_id_, new CallbackDispatcher(AsWeakPtr())); } void WebFileWriterImpl::DoWrite( - const GURL& path, const GURL& blob_url, int64 offset) { - GetFileSystemDispatcher()->Write( - path, blob_url, offset, &request_id_, - new CallbackDispatcher(AsWeakPtr())); + const FilePath& path, const GURL& blob_url, int64 offset) { + GetFileSystemDispatcher()->Write(path, blob_url, offset, &request_id_, + new CallbackDispatcher(AsWeakPtr())); } void WebFileWriterImpl::DoCancel() { diff --git a/content/common/file_system/webfilewriter_impl.h b/content/common/file_system/webfilewriter_impl.h index 792926e..fa34eaf 100644 --- a/content/common/file_system/webfilewriter_impl.h +++ b/content/common/file_system/webfilewriter_impl.h @@ -15,13 +15,14 @@ class FileSystemDispatcher; class WebFileWriterImpl : public fileapi::WebFileWriterBase, public base::SupportsWeakPtr<WebFileWriterImpl> { public: - WebFileWriterImpl(const GURL& path, WebKit::WebFileWriterClient* client); + WebFileWriterImpl( + const WebKit::WebString& path, WebKit::WebFileWriterClient* client); virtual ~WebFileWriterImpl(); protected: // WebFileWriterBase overrides - virtual void DoTruncate(const GURL& path, int64 offset); - virtual void DoWrite(const GURL& path, const GURL& blob_url, + virtual void DoTruncate(const FilePath& path, int64 offset); + virtual void DoWrite(const FilePath& path, const GURL& blob_url, int64 offset); virtual void DoCancel(); diff --git a/content/common/file_system_messages.h b/content/common/file_system_messages.h index d91a7a6..173a885 100644 --- a/content/common/file_system_messages.h +++ b/content/common/file_system_messages.h @@ -25,7 +25,7 @@ IPC_MESSAGE_CONTROL4(FileSystemMsg_OpenComplete, int /* request_id */, bool /* accepted */, std::string /* name */, - GURL /* root_url */) + FilePath /* root_path */) // WebFileSystem response messages. IPC_MESSAGE_CONTROL1(FileSystemMsg_DidSucceed, @@ -59,30 +59,30 @@ IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Open, // WebFileSystem::move() message. IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Move, int /* request_id */, - GURL /* src path */, - GURL /* dest path */) + FilePath /* src path */, + FilePath /* dest path */) // WebFileSystem::copy() message. IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Copy, int /* request_id */, - GURL /* src path */, - GURL /* dest path */) + FilePath /* src path */, + FilePath /* dest path */) // WebFileSystem::remove() message. IPC_MESSAGE_CONTROL3(FileSystemMsg_Remove, int /* request_id */, - GURL /* path */, + FilePath /* path */, bool /* recursive */) // WebFileSystem::readMetadata() message. IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadMetadata, int /* request_id */, - GURL /* path */) + FilePath /* path */) // WebFileSystem::create() message. IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Create, int /* request_id */, - GURL /* path */, + FilePath /* path */, bool /* exclusive */, bool /* is_directory */, bool /* recursive */) @@ -90,31 +90,31 @@ IPC_MESSAGE_CONTROL5(FileSystemHostMsg_Create, // WebFileSystem::exists() messages. IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Exists, int /* request_id */, - GURL /* path */, + FilePath /* path */, bool /* is_directory */) // WebFileSystem::readDirectory() message. IPC_MESSAGE_CONTROL2(FileSystemHostMsg_ReadDirectory, int /* request_id */, - GURL /* path */) + FilePath /* path */) // WebFileWriter::write() message. IPC_MESSAGE_CONTROL4(FileSystemHostMsg_Write, int /* request id */, - GURL /* file path */, + FilePath /* file path */, GURL /* blob URL */, int64 /* position */) // WebFileWriter::truncate() message. IPC_MESSAGE_CONTROL3(FileSystemHostMsg_Truncate, int /* request id */, - GURL /* file path */, + FilePath /* file path */, int64 /* length */) // Pepper's Touch() message. IPC_MESSAGE_CONTROL4(FileSystemHostMsg_TouchFile, int /* request_id */, - GURL /* path */, + FilePath /* path */, base::Time /* last_access_time */, base::Time /* last_modified_time */) diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc index 7706014..96c775c 100644 --- a/content/renderer/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper_plugin_delegate_impl.cc @@ -604,7 +604,7 @@ bool PepperPluginDelegateImpl::OpenFileSystem( } bool PepperPluginDelegateImpl::MakeDirectory( - const GURL& path, + const FilePath& path, bool recursive, fileapi::FileSystemCallbackDispatcher* dispatcher) { FileSystemDispatcher* file_system_dispatcher = @@ -614,7 +614,7 @@ bool PepperPluginDelegateImpl::MakeDirectory( } bool PepperPluginDelegateImpl::Query( - const GURL& path, + const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher) { FileSystemDispatcher* file_system_dispatcher = ChildThread::current()->file_system_dispatcher(); @@ -622,7 +622,7 @@ bool PepperPluginDelegateImpl::Query( } bool PepperPluginDelegateImpl::Touch( - const GURL& path, + const FilePath& path, const base::Time& last_access_time, const base::Time& last_modified_time, fileapi::FileSystemCallbackDispatcher* dispatcher) { @@ -633,7 +633,7 @@ bool PepperPluginDelegateImpl::Touch( } bool PepperPluginDelegateImpl::Delete( - const GURL& path, + const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher) { FileSystemDispatcher* file_system_dispatcher = ChildThread::current()->file_system_dispatcher(); @@ -642,8 +642,8 @@ bool PepperPluginDelegateImpl::Delete( } bool PepperPluginDelegateImpl::Rename( - const GURL& file_path, - const GURL& new_file_path, + const FilePath& file_path, + const FilePath& new_file_path, fileapi::FileSystemCallbackDispatcher* dispatcher) { FileSystemDispatcher* file_system_dispatcher = ChildThread::current()->file_system_dispatcher(); @@ -651,7 +651,7 @@ bool PepperPluginDelegateImpl::Rename( } bool PepperPluginDelegateImpl::ReadDirectory( - const GURL& directory_path, + const FilePath& directory_path, fileapi::FileSystemCallbackDispatcher* dispatcher) { FileSystemDispatcher* file_system_dispatcher = ChildThread::current()->file_system_dispatcher(); diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h index ff531a3..f839229 100644 --- a/content/renderer/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper_plugin_delegate_impl.h @@ -115,21 +115,21 @@ class PepperPluginDelegateImpl fileapi::FileSystemType type, long long size, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool MakeDirectory(const GURL& path, + virtual bool MakeDirectory(const FilePath& path, bool recursive, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool Query(const GURL& path, + virtual bool Query(const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool Touch(const GURL& path, + virtual bool Touch(const FilePath& path, const base::Time& last_access_time, const base::Time& last_modified_time, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool Delete(const GURL& path, + virtual bool Delete(const FilePath& path, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool Rename(const GURL& file_path, - const GURL& new_file_path, + virtual bool Rename(const FilePath& file_path, + const FilePath& new_file_path, fileapi::FileSystemCallbackDispatcher* dispatcher); - virtual bool ReadDirectory(const GURL& directory_path, + virtual bool ReadDirectory(const FilePath& directory_path, fileapi::FileSystemCallbackDispatcher* dispatcher); virtual base::PlatformFileError OpenFile( const webkit::ppapi::PepperFilePath& path, |