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

Unified Diff: chrome/browser/chromeos/drive/file_system/operation_observer.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/file_system/operation_observer.h
diff --git a/chrome/browser/chromeos/drive/file_system/operation_observer.h b/chrome/browser/chromeos/drive/file_system/operation_observer.h
index 8fd8a1c4070117c0d578f97fc1641eb08e2a8254..ffd378c994e0110983866c23f871e32f41127ad9 100644
--- a/chrome/browser/chromeos/drive/file_system/operation_observer.h
+++ b/chrome/browser/chromeos/drive/file_system/operation_observer.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
+#include "chrome/browser/chromeos/drive/file_errors.h"
+
namespace base {
class FilePath;
}
@@ -26,6 +28,7 @@ enum DriveSyncErrorType {
};
// Passes notifications from Drive operations back to the file system.
+// TODO(hashimoto): Give this class a more appropriate name.
class OperationObserver {
public:
// Sent when a content of a directory has been changed.
@@ -40,6 +43,11 @@ class OperationObserver {
// |local_id| is the local ID of the resource entry.
virtual void OnDriveSyncError(DriveSyncErrorType type,
const std::string& local_id) {}
+
+ // Waits for the sync task to complete and runs the callback.
+ // Returns false if no task is found for the spcecified ID.
+ virtual bool WaitForSyncComplete(const std::string& local_id,
+ const FileOperationCallback& callback);
};
} // namespace file_system

Powered by Google App Engine
This is Rietveld 408576698