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

Unified Diff: chrome/browser/sync_file_system/remote_file_sync_service.h

Issue 11275225: Add a callback to RemoteFileSyncService for reporting errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +TODO comment Created 8 years, 1 month 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/sync_file_system/remote_file_sync_service.h
diff --git a/chrome/browser/sync_file_system/remote_file_sync_service.h b/chrome/browser/sync_file_system/remote_file_sync_service.h
index 1e7120d3d5c8a89d51301be2d441076abaf0325b..5227d39eb08a4abfb568734603a7863fa92c1bf4 100644
--- a/chrome/browser/sync_file_system/remote_file_sync_service.h
+++ b/chrome/browser/sync_file_system/remote_file_sync_service.h
@@ -32,6 +32,11 @@ class RemoteFileSyncService {
// scheduling but the value may not be accurately reflect the real-time
// value.
virtual void OnRemoteChangeAvailable(int64 pending_changes_hint) = 0;
+
+ // This is called when RemoteFileSyncService changes its status.
+ virtual void OnRemoteSyncStatusChanged(
+ fileapi::SyncStatusCode new_status) {}
+
private:
DISALLOW_COPY_AND_ASSIGN(Observer);
};
@@ -43,10 +48,16 @@ class RemoteFileSyncService {
virtual void RemoveObserver(Observer* observer) = 0;
// Registers |origin| to track remote side changes for the |origin|.
- virtual void RegisterOriginForTrackingChanges(const GURL& origin) = 0;
+ // Upon completion, invokes |callback| if it's non-empty.
+ virtual void RegisterOriginForTrackingChanges(
+ const GURL& origin,
+ const fileapi::SyncStatusCallback& callback) = 0;
// Unregisters |origin| to track remote side changes for the |origin|.
- virtual void UnregisterOriginForTrackingChanges(const GURL& origin) = 0;
+ // Upon completion, invokes |callback| if it's non-empty.
+ virtual void UnregisterOriginForTrackingChanges(
+ const GURL& origin,
+ const fileapi::SyncStatusCallback& callback) = 0;
// Called by the sync engine to process one remote change.
// After a change is processed |callback| will be called (to return

Powered by Google App Engine
This is Rietveld 408576698