| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_callback_factory.h" | 9 #include "base/memory/scoped_callback_factory.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 FILE_PATH_LITERAL("FS.old"); | 272 FILE_PATH_LITERAL("FS.old"); |
| 273 | 273 |
| 274 SandboxMountPointProvider::SandboxMountPointProvider( | 274 SandboxMountPointProvider::SandboxMountPointProvider( |
| 275 FileSystemPathManager* path_manager, | 275 FileSystemPathManager* path_manager, |
| 276 scoped_refptr<base::MessageLoopProxy> file_message_loop, | 276 scoped_refptr<base::MessageLoopProxy> file_message_loop, |
| 277 const FilePath& profile_path) | 277 const FilePath& profile_path) |
| 278 : FileSystemQuotaUtil(file_message_loop), | 278 : FileSystemQuotaUtil(file_message_loop), |
| 279 path_manager_(path_manager), | 279 path_manager_(path_manager), |
| 280 file_message_loop_(file_message_loop), | 280 file_message_loop_(file_message_loop), |
| 281 profile_path_(profile_path), | 281 profile_path_(profile_path), |
| 282 quota_file_util_(QuotaFileUtil::GetInstance()), | 282 quota_file_util_(QuotaFileUtil::CreateDefault()), |
| 283 sandbox_file_util_( | 283 sandbox_file_util_( |
| 284 new ObfuscatedFileSystemFileUtil( | 284 new ObfuscatedFileSystemFileUtil( |
| 285 profile_path.Append(kNewFileSystemDirectory), | 285 profile_path.Append(kNewFileSystemDirectory), |
| 286 quota_file_util_)) { | 286 quota_file_util_)) { |
| 287 } | 287 } |
| 288 | 288 |
| 289 SandboxMountPointProvider::~SandboxMountPointProvider() { | 289 SandboxMountPointProvider::~SandboxMountPointProvider() { |
| 290 if (!file_message_loop_->BelongsToCurrentThread()) | 290 if (!file_message_loop_->BelongsToCurrentThread()) |
| 291 file_message_loop_->ReleaseSoon(FROM_HERE, sandbox_file_util_.release()); | 291 file_message_loop_->ReleaseSoon(FROM_HERE, sandbox_file_util_.release()); |
| 292 } | 292 } |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 | 652 |
| 653 // Creates the root directory. | 653 // Creates the root directory. |
| 654 root = origin_base_path.Append(OldCreateUniqueDirectoryName(origin_url)); | 654 root = origin_base_path.Append(OldCreateUniqueDirectoryName(origin_url)); |
| 655 if (!file_util::CreateDirectory(root)) | 655 if (!file_util::CreateDirectory(root)) |
| 656 return FilePath(); | 656 return FilePath(); |
| 657 | 657 |
| 658 return root; | 658 return root; |
| 659 } | 659 } |
| 660 | 660 |
| 661 } // namespace fileapi | 661 } // namespace fileapi |
| OLD | NEW |