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

Unified Diff: chrome/browser/chromeos/drive/sync_client.h

Issue 372713004: Wait for parent directory sync before performing server-side copy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add operation_observer.cc 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/sync_client.h
diff --git a/chrome/browser/chromeos/drive/sync_client.h b/chrome/browser/chromeos/drive/sync_client.h
index 0efccd67481b4a5bc478cca436e24504744e0ec6..4fc5d1fe259fc010961a8b5cb1cf85c177a94d7a 100644
--- a/chrome/browser/chromeos/drive/sync_client.h
+++ b/chrome/browser/chromeos/drive/sync_client.h
@@ -67,6 +67,11 @@ class SyncClient {
// Adds a update task.
void AddUpdateTask(const ClientContext& context, const std::string& local_id);
+ // Waits for the update task to complete and runs the callback.
+ // Returns false if no task is found for the spcecified ID.
+ bool WaitForUpdateTaskToComplete(const std::string& local_id,
+ const FileOperationCallback& callback);
+
// Starts processing the backlog (i.e. pinned-but-not-filed files and
// dirty-but-not-uploaded files). Kicks off retrieval of the local
// IDs of these files, and then starts the sync loop.
@@ -82,9 +87,6 @@ class SyncClient {
delay_ = delay;
}
- // Starts the sync loop if it's not running.
- void StartSyncLoop();
-
private:
// Types of sync tasks.
enum SyncType {
@@ -110,6 +112,7 @@ class SyncClient {
bool should_run_again;
base::Closure cancel_closure;
std::vector<SyncTaskKey> dependent_tasks;
+ std::vector<FileOperationCallback> waiting_callbacks;
};
typedef std::map<SyncTaskKey, SyncTask> SyncTasks;
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operation_test_base.cc ('k') | chrome/browser/chromeos/drive/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698