Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: chrome/browser/chromeos/drive/file_system/copy_operation.h

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::FileResource> 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(const FileOperationCallback& callback,
125 const FileOperationCallback& callback, 125 base::FilePath* file_path,
126 base::FilePath* file_path, 126 const ResourceEntry* entry,
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
131 // dirty, so that SyncClient will upload the data later. 131 // dirty, so that SyncClient will upload the data later.
132 void ScheduleTransferRegularFile(const base::FilePath& local_src_path, 132 void ScheduleTransferRegularFile(const base::FilePath& local_src_path,
133 const base::FilePath& remote_dest_path, 133 const base::FilePath& remote_dest_path,
134 const FileOperationCallback& callback); 134 const FileOperationCallback& callback);
135 135
136 // Part of ScheduleTransferRegularFile(). Called after file creation. 136 // Part of ScheduleTransferRegularFile(). Called after file creation.
137 void ScheduleTransferRegularFileAfterCreate( 137 void ScheduleTransferRegularFileAfterCreate(
138 const base::FilePath& local_src_path, 138 const base::FilePath& local_src_path,
139 const base::FilePath& remote_dest_path, 139 const base::FilePath& remote_dest_path,
140 const FileOperationCallback& callback, 140 const FileOperationCallback& callback,
141 FileError error); 141 FileError error);
142 142
143 // Part of ScheduleTransferRegularFile(). Called after updating local state 143 // Part of ScheduleTransferRegularFile(). Called after updating local state
144 // is completed. 144 // is completed.
145 void ScheduleTransferRegularFileAfterUpdateLocalState( 145 void ScheduleTransferRegularFileAfterUpdateLocalState(
146 const FileOperationCallback& callback, 146 const FileOperationCallback& callback,
147 const base::FilePath& remote_dest_path, 147 const base::FilePath& remote_dest_path,
148 const ResourceEntry* entry,
148 std::string* local_id, 149 std::string* local_id,
149 FileError error); 150 FileError error);
150 151
151 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 152 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
152 OperationObserver* observer_; 153 OperationObserver* observer_;
153 JobScheduler* scheduler_; 154 JobScheduler* scheduler_;
154 internal::ResourceMetadata* metadata_; 155 internal::ResourceMetadata* metadata_;
155 internal::FileCache* cache_; 156 internal::FileCache* cache_;
156 ResourceIdCanonicalizer id_canonicalizer_; 157 ResourceIdCanonicalizer id_canonicalizer_;
157 158
158 // Uploading a new file is internally implemented by creating a dirty file. 159 // Uploading a new file is internally implemented by creating a dirty file.
159 scoped_ptr<CreateFileOperation> create_file_operation_; 160 scoped_ptr<CreateFileOperation> create_file_operation_;
160 161
161 // Note: This should remain the last member so it'll be destroyed and 162 // Note: This should remain the last member so it'll be destroyed and
162 // invalidate the weak pointers before any other members are destroyed. 163 // invalidate the weak pointers before any other members are destroyed.
163 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_; 164 base::WeakPtrFactory<CopyOperation> weak_ptr_factory_;
164 DISALLOW_COPY_AND_ASSIGN(CopyOperation); 165 DISALLOW_COPY_AND_ASSIGN(CopyOperation);
165 }; 166 };
166 167
167 } // namespace file_system 168 } // namespace file_system
168 } // namespace drive 169 } // namespace drive
169 170
170 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_ 171 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_COPY_OPERATION_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/copy_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698