| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "chrome/browser/chromeos/drive/file_errors.h" | 15 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 16 #include "google_apis/drive/gdata_errorcode.h" | 16 #include "google_apis/drive/drive_api_error_codes.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class FilePath; | 19 class FilePath; |
| 20 class SequencedTaskRunner; | 20 class SequencedTaskRunner; |
| 21 class Time; | 21 class Time; |
| 22 } // namespace base | 22 } // namespace base |
| 23 | 23 |
| 24 namespace google_apis { | 24 namespace google_apis { |
| 25 class FileResource; | 25 class FileResource; |
| 26 } // namespace google_apis | 26 } // namespace google_apis |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void CopyResourceOnServer(const std::string& resource_id, | 117 void CopyResourceOnServer(const std::string& resource_id, |
| 118 const std::string& parent_resource_id, | 118 const std::string& parent_resource_id, |
| 119 const std::string& new_title, | 119 const std::string& new_title, |
| 120 const base::Time& last_modified, | 120 const base::Time& last_modified, |
| 121 const FileOperationCallback& callback); | 121 const FileOperationCallback& callback); |
| 122 | 122 |
| 123 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. | 123 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. |
| 124 // Called after server side operation is done. | 124 // Called after server side operation is done. |
| 125 void UpdateAfterServerSideOperation( | 125 void UpdateAfterServerSideOperation( |
| 126 const FileOperationCallback& callback, | 126 const FileOperationCallback& callback, |
| 127 google_apis::GDataErrorCode status, | 127 google_apis::DriveApiErrorCode status, |
| 128 scoped_ptr<google_apis::FileResource> entry); | 128 scoped_ptr<google_apis::FileResource> entry); |
| 129 | 129 |
| 130 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. | 130 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. |
| 131 // Called after local state update is done. | 131 // Called after local state update is done. |
| 132 void UpdateAfterLocalStateUpdate(const FileOperationCallback& callback, | 132 void UpdateAfterLocalStateUpdate(const FileOperationCallback& callback, |
| 133 base::FilePath* file_path, | 133 base::FilePath* file_path, |
| 134 const ResourceEntry* entry, | 134 const ResourceEntry* entry, |
| 135 FileError error); | 135 FileError error); |
| 136 | 136 |
| 137 // Creates an empty file on the server at |remote_dest_path| to ensure | 137 // Creates an empty file on the server at |remote_dest_path| to ensure |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Note: This should remain the last member so it'll be destroyed and | 169 // Note: This should remain the last member so it'll be destroyed and |
| 170 // invalidate the weak pointers before any other members are destroyed. | 170 // invalidate the weak pointers before any other members are destroyed. |
| 171 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; | 171 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; |
| 172 DISALLOW_COPY_AND_ASSIGN(CopyOperation); | 172 DISALLOW_COPY_AND_ASSIGN(CopyOperation); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace file_system | 175 } // namespace file_system |
| 176 } // namespace drive | 176 } // namespace drive |
| 177 | 177 |
| 178 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ | 178 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ |
| OLD | NEW |