OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COPY_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 private: | 83 private: |
84 // Part of Copy(). Called after trying to copy locally. | 84 // Part of Copy(). Called after trying to copy locally. |
85 void CopyAfterTryToCopyLocally( | 85 void CopyAfterTryToCopyLocally( |
86 const CopyParams* params, | 86 const CopyParams* params, |
87 const std::vector<std::string>* updated_local_ids, | 87 const std::vector<std::string>* updated_local_ids, |
88 const bool* directory_changed, | 88 const bool* directory_changed, |
89 const bool* should_copy_on_server, | 89 const bool* should_copy_on_server, |
90 FileError error); | 90 FileError error); |
91 | 91 |
| 92 // Part of Copy(). Called after the parent entry gets synced. |
| 93 void CopyAfterParentSync(const CopyParams& params, FileError error); |
| 94 |
| 95 // Part of Copy(). Called after the parent resource ID is resolved. |
| 96 void CopyAfterGetParentResourceId(const CopyParams& params, |
| 97 const ResourceEntry* parent, |
| 98 FileError error); |
| 99 |
92 // Part of TransferFileFromLocalToRemote(). Called after preparation is done. | 100 // Part of TransferFileFromLocalToRemote(). Called after preparation is done. |
93 // |gdoc_resource_id| and |parent_resource_id| is available only if the file | 101 // |gdoc_resource_id| and |parent_resource_id| is available only if the file |
94 // is JSON GDoc file. | 102 // is JSON GDoc file. |
95 void TransferFileFromLocalToRemoteAfterPrepare( | 103 void TransferFileFromLocalToRemoteAfterPrepare( |
96 const base::FilePath& local_src_path, | 104 const base::FilePath& local_src_path, |
97 const base::FilePath& remote_dest_path, | 105 const base::FilePath& remote_dest_path, |
98 const FileOperationCallback& callback, | 106 const FileOperationCallback& callback, |
99 std::string* gdoc_resource_id, | 107 std::string* gdoc_resource_id, |
100 ResourceEntry* parent_entry, | 108 ResourceEntry* parent_entry, |
101 FileError error); | 109 FileError error); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Note: This should remain the last member so it'll be destroyed and | 170 // Note: This should remain the last member so it'll be destroyed and |
163 // invalidate the weak pointers before any other members are destroyed. | 171 // invalidate the weak pointers before any other members are destroyed. |
164 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; | 172 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; |
165 DISALLOW_COPY_AND_ASSIGN(CopyOperation); | 173 DISALLOW_COPY_AND_ASSIGN(CopyOperation); |
166 }; | 174 }; |
167 | 175 |
168 } // namespace file_system | 176 } // namespace file_system |
169 } // namespace drive | 177 } // namespace drive |
170 | 178 |
171 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ | 179 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ |
OLD | NEW |