diff options
author | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-03 01:34:49 +0000 |
---|---|---|
committer | kkanetkar@chromium.org <kkanetkar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-03 01:34:49 +0000 |
commit | d275d7aeb039564c79f05649523e38720b293a0e (patch) | |
tree | 2ae3304c51e6f0c66a1e75109dab8596e93d70fe /chrome/browser/file_system | |
parent | dbe774304940321f26d0dcb9a29b24f0294415dc (diff) | |
download | chromium_src-d275d7aeb039564c79f05649523e38720b293a0e.zip chromium_src-d275d7aeb039564c79f05649523e38720b293a0e.tar.gz chromium_src-d275d7aeb039564c79f05649523e38720b293a0e.tar.bz2 |
Added ability to propogate create to suggest whether or not filesystem's root should
be created if the path doesn't exist.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/4350001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/file_system')
-rw-r--r-- | chrome/browser/file_system/file_system_dispatcher_host.cc | 11 | ||||
-rw-r--r-- | chrome/browser/file_system/file_system_dispatcher_host.h | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/chrome/browser/file_system/file_system_dispatcher_host.cc b/chrome/browser/file_system/file_system_dispatcher_host.cc index f1ef3ca..cb13bd0 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.cc +++ b/chrome/browser/file_system/file_system_dispatcher_host.cc @@ -31,9 +31,11 @@ class FileSystemDispatcherHost::OpenFileSystemTask { int request_id, const GURL& origin_url, fileapi::FileSystemType type, + bool create, FileSystemDispatcherHost* dispatcher_host) { // The task is self-destructed. - new OpenFileSystemTask(request_id, origin_url, type, dispatcher_host); + new OpenFileSystemTask( + request_id, origin_url, type, create, dispatcher_host); } private: @@ -54,12 +56,13 @@ class FileSystemDispatcherHost::OpenFileSystemTask { int request_id, const GURL& origin_url, fileapi::FileSystemType type, + bool create, FileSystemDispatcherHost* dispatcher_host) : request_id_(request_id), dispatcher_host_(dispatcher_host), callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { dispatcher_host->context_->path_manager()->GetFileSystemRootPath( - origin_url, type, true /* create */, + origin_url, type, create, callback_factory_.NewCallback(&OpenFileSystemTask::DidGetRootPath)); } @@ -138,7 +141,7 @@ bool FileSystemDispatcherHost::OnMessageReceived( void FileSystemDispatcherHost::OnOpenFileSystem( int request_id, const GURL& origin_url, fileapi::FileSystemType type, - int64 requested_size) { + int64 requested_size, bool create) { ContentSetting content_setting = host_content_settings_map_->GetContentSetting( origin_url, CONTENT_SETTINGS_TYPE_COOKIES, ""); @@ -153,7 +156,7 @@ void FileSystemDispatcherHost::OnOpenFileSystem( return; } - OpenFileSystemTask::Start(request_id, origin_url, type, this); + OpenFileSystemTask::Start(request_id, origin_url, type, create, this); } void FileSystemDispatcherHost::OnMove( diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h index 94d0cf4..f51e7f2 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.h +++ b/chrome/browser/file_system/file_system_dispatcher_host.h @@ -48,7 +48,8 @@ class FileSystemDispatcherHost void OnOpenFileSystem(int request_id, const GURL& origin_url, fileapi::FileSystemType type, - int64 requested_size); + int64 requested_size, + bool create); void OnMove(int request_id, const FilePath& src_path, const FilePath& dest_path); |