| 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" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/chromeos/drive/file_errors.h" | 12 #include "chrome/browser/chromeos/drive/file_errors.h" |
| 13 #include "chrome/browser/drive/drive_service_interface.h" | 13 #include "chrome/browser/drive/drive_service_interface.h" |
| 14 #include "google_apis/drive/gdata_errorcode.h" | 14 #include "google_apis/drive/gdata_errorcode.h" |
| 15 | 15 |
| 16 namespace base { | 16 namespace base { |
| 17 class FilePath; | 17 class FilePath; |
| 18 class SequencedTaskRunner; | 18 class SequencedTaskRunner; |
| 19 class Time; | 19 class Time; |
| 20 } // namespace base | 20 } // namespace base |
| 21 | 21 |
| 22 namespace google_apis { | 22 namespace google_apis { |
| 23 class AboutResource; | 23 class AboutResource; |
| 24 class ResourceEntry; | 24 class FileResource; |
| 25 } // namespace google_apis | 25 } // namespace google_apis |
| 26 | 26 |
| 27 namespace drive { | 27 namespace drive { |
| 28 | 28 |
| 29 class JobScheduler; | 29 class JobScheduler; |
| 30 class ResourceEntry; | 30 class ResourceEntry; |
| 31 | 31 |
| 32 namespace internal { | 32 namespace internal { |
| 33 class FileCache; | 33 class FileCache; |
| 34 class ResourceMetadata; | 34 class ResourceMetadata; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const std::string& parent_resource_id, | 110 const std::string& parent_resource_id, |
| 111 const std::string& new_title, | 111 const std::string& new_title, |
| 112 const base::Time& last_modified, | 112 const base::Time& last_modified, |
| 113 const FileOperationCallback& callback); | 113 const FileOperationCallback& callback); |
| 114 | 114 |
| 115 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. | 115 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. |
| 116 // Called after server side operation is done. | 116 // Called after server side operation is done. |
| 117 void UpdateAfterServerSideOperation( | 117 void UpdateAfterServerSideOperation( |
| 118 const FileOperationCallback& callback, | 118 const FileOperationCallback& callback, |
| 119 google_apis::GDataErrorCode status, | 119 google_apis::GDataErrorCode status, |
| 120 scoped_ptr<google_apis::ResourceEntry> resource_entry); | 120 scoped_ptr<google_apis::FileResource> entry); |
| 121 | 121 |
| 122 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. | 122 // Part of CopyResourceOnServer and TransferFileFromLocalToRemote. |
| 123 // Called after local state update is done. | 123 // Called after local state update is done. |
| 124 void UpdateAfterLocalStateUpdate( | 124 void UpdateAfterLocalStateUpdate( |
| 125 const FileOperationCallback& callback, | 125 const FileOperationCallback& callback, |
| 126 base::FilePath* file_path, | 126 base::FilePath* file_path, |
| 127 FileError error); | 127 FileError error); |
| 128 | 128 |
| 129 // Creates an empty file on the server at |remote_dest_path| to ensure | 129 // Creates an empty file on the server at |remote_dest_path| to ensure |
| 130 // the location, stores a file at |local_file_path| in cache and marks it | 130 // the location, stores a file at |local_file_path| in cache and marks it |
| (...skipping 30 matching lines...) Expand all Loading... |
| 161 // Note: This should remain the last member so it'll be destroyed and | 161 // Note: This should remain the last member so it'll be destroyed and |
| 162 // invalidate the weak pointers before any other members are destroyed. | 162 // invalidate the weak pointers before any other members are destroyed. |
| 163 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; | 163 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; |
| 164 DISALLOW_COPY_AND_ASSIGN(CopyOperation); | 164 DISALLOW_COPY_AND_ASSIGN(CopyOperation); |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 } // namespace file_system | 167 } // namespace file_system |
| 168 } // namespace drive | 168 } // namespace drive |
| 169 | 169 |
| 170 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ | 170 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ |
| OLD | NEW |