summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_path_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/fileapi/file_system_path_manager.cc')
-rw-r--r--webkit/fileapi/file_system_path_manager.cc39
1 files changed, 19 insertions, 20 deletions
diff --git a/webkit/fileapi/file_system_path_manager.cc b/webkit/fileapi/file_system_path_manager.cc
index 569c261..2690e7b 100644
--- a/webkit/fileapi/file_system_path_manager.cc
+++ b/webkit/fileapi/file_system_path_manager.cc
@@ -56,27 +56,26 @@ FileSystemPathManager::FileSystemPathManager(
FileSystemPathManager::~FileSystemPathManager() {}
void FileSystemPathManager::ValidateFileSystemRootAndGetURL(
- const GURL& origin_url, fileapi::FileSystemType type,
- bool create, GetRootPathCallback* callback_ptr) {
- scoped_ptr<GetRootPathCallback> callback(callback_ptr);
+ const GURL& origin_url, fileapi::FileSystemType type, bool create,
+ const GetRootPathCallback& callback) {
switch (type) {
- case kFileSystemTypeTemporary:
- case kFileSystemTypePersistent:
- sandbox_provider_->ValidateFileSystemRootAndGetURL(
- origin_url, type, create, callback.release());
- break;
- case kFileSystemTypeExternal:
- if (external_provider_.get()) {
- external_provider_->ValidateFileSystemRootAndGetURL(
- origin_url, type, create, callback.release());
- } else {
- callback->Run(false, FilePath(), std::string());
- }
- break;
- case kFileSystemTypeUnknown:
- default:
- NOTREACHED();
- callback->Run(false, FilePath(), std::string());
+ case kFileSystemTypeTemporary:
+ case kFileSystemTypePersistent:
+ sandbox_provider_->ValidateFileSystemRootAndGetURL(
+ origin_url, type, create, callback);
+ break;
+ case kFileSystemTypeExternal:
+ if (external_provider_.get()) {
+ external_provider_->ValidateFileSystemRootAndGetURL(
+ origin_url, type, create, callback);
+ } else {
+ callback.Run(false, FilePath(), std::string());
+ }
+ break;
+ case kFileSystemTypeUnknown:
+ default:
+ NOTREACHED();
+ callback.Run(false, FilePath(), std::string());
}
}