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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 public: | 306 public: |
307 GetFileSystemRootPathTask( | 307 GetFileSystemRootPathTask( |
308 scoped_refptr<base::MessageLoopProxy> file_message_loop, | 308 scoped_refptr<base::MessageLoopProxy> file_message_loop, |
309 const GURL& origin_url, | 309 const GURL& origin_url, |
310 FileSystemType type, | 310 FileSystemType type, |
311 ObfuscatedFileSystemFileUtil* file_util, | 311 ObfuscatedFileSystemFileUtil* file_util, |
312 const FilePath& old_base_path, | 312 const FilePath& old_base_path, |
313 FileSystemPathManager::GetRootPathCallback* callback) | 313 FileSystemPathManager::GetRootPathCallback* callback) |
314 : file_message_loop_(file_message_loop), | 314 : file_message_loop_(file_message_loop), |
315 origin_message_loop_proxy_( | 315 origin_message_loop_proxy_( |
316 base::MessageLoopProxy::CreateForCurrentThread()), | 316 base::MessageLoopProxy::current()), |
317 origin_url_(origin_url), | 317 origin_url_(origin_url), |
318 type_(type), | 318 type_(type), |
319 file_util_(file_util), | 319 file_util_(file_util), |
320 old_base_path_(old_base_path), | 320 old_base_path_(old_base_path), |
321 callback_(callback) { | 321 callback_(callback) { |
322 } | 322 } |
323 | 323 |
324 virtual ~GetFileSystemRootPathTask() { | 324 virtual ~GetFileSystemRootPathTask() { |
325 // Just in case we get deleted without running, make sure to clean up the | 325 // Just in case we get deleted without running, make sure to clean up the |
326 // file_util_ on the right thread. | 326 // file_util_ on the right thread. |
(...skipping 325 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 |