| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "chrome/browser/chromeos/drive/file_errors.h" | 13 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 14 | 14 |
| 15 namespace base { | 15 namespace base { |
| 16 class FilePath; | 16 class FilePath; |
| 17 class SequencedTaskRunner; | 17 class SequencedTaskRunner; |
| 18 } // namespace base | 18 } // namespace base |
| 19 | 19 |
| 20 namespace drive { | 20 namespace drive { |
| 21 | 21 |
| 22 class FileChange; |
| 22 class ResourceEntry; | 23 class ResourceEntry; |
| 23 | 24 |
| 24 namespace internal { | 25 namespace internal { |
| 25 class ResourceMetadata; | 26 class ResourceMetadata; |
| 26 } // namespace internal | 27 } // namespace internal |
| 27 | 28 |
| 28 namespace file_system { | 29 namespace file_system { |
| 29 | 30 |
| 30 class OperationObserver; | 31 class OperationObserver; |
| 31 | 32 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 49 void CreateDirectory(const base::FilePath& directory_path, | 50 void CreateDirectory(const base::FilePath& directory_path, |
| 50 bool is_exclusive, | 51 bool is_exclusive, |
| 51 bool is_recursive, | 52 bool is_recursive, |
| 52 const FileOperationCallback& callback); | 53 const FileOperationCallback& callback); |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 // Part of CreateDirectory(). Called after UpdateLocalState(). | 56 // Part of CreateDirectory(). Called after UpdateLocalState(). |
| 56 void CreateDirectoryAfterUpdateLocalState( | 57 void CreateDirectoryAfterUpdateLocalState( |
| 57 const FileOperationCallback& callback, | 58 const FileOperationCallback& callback, |
| 58 const std::set<std::string>* updated_local_ids, | 59 const std::set<std::string>* updated_local_ids, |
| 59 const std::set<base::FilePath>* changed_directories, | 60 const FileChange* changed_directories, |
| 60 FileError error); | 61 FileError error); |
| 61 | 62 |
| 62 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 63 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 63 OperationObserver* observer_; | 64 OperationObserver* observer_; |
| 64 internal::ResourceMetadata* metadata_; | 65 internal::ResourceMetadata* metadata_; |
| 65 | 66 |
| 66 // Note: This should remain the last member so it'll be destroyed and | 67 // Note: This should remain the last member so it'll be destroyed and |
| 67 // invalidate the weak pointers before any other members are destroyed. | 68 // invalidate the weak pointers before any other members are destroyed. |
| 68 base::WeakPtrFactory<CreateDirectoryOperation> weak_ptr_factory_; | 69 base::WeakPtrFactory<CreateDirectoryOperation> weak_ptr_factory_; |
| 69 DISALLOW_COPY_AND_ASSIGN(CreateDirectoryOperation); | 70 DISALLOW_COPY_AND_ASSIGN(CreateDirectoryOperation); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace file_system | 73 } // namespace file_system |
| 73 } // namespace drive | 74 } // namespace drive |
| 74 | 75 |
| 75 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_
H_ | 76 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_CREATE_DIRECTORY_OPERATION_
H_ |
| OLD | NEW |