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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h

Issue 328063003: [SyncFS] Migrate SyncWorker::Observer to SyncWorkerInterface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_worker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h b/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
index 2108fefdb6a6aee0e29cdbcac180b4a7b1381a17..41b004abc598cb88e4e201bc49ee4bb29173c745 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
@@ -9,7 +9,9 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/sync_file_system/remote_file_sync_service.h"
+#include "chrome/browser/sync_file_system/sync_action.h"
#include "chrome/browser/sync_file_system/sync_callbacks.h"
+#include "chrome/browser/sync_file_system/sync_direction.h"
#include "net/base/network_change_notifier.h"
class GURL;
@@ -41,6 +43,21 @@ class SyncTaskManager;
class SyncWorkerInterface {
public:
+ class Observer {
+ public:
+ virtual void OnPendingFileListUpdated(int item_count) = 0;
+ virtual void OnFileStatusChanged(const fileapi::FileSystemURL& url,
+ SyncFileStatus file_status,
+ SyncAction sync_action,
+ SyncDirection direction) = 0;
+ virtual void UpdateServiceState(RemoteServiceState state,
+ const std::string& description) = 0;
+
+ protected:
+ virtual ~Observer() {}
+ };
+
+ SyncWorkerInterface() {}
virtual ~SyncWorkerInterface() {}
// Initializes SyncWorkerInterface after constructions of some member classes.
@@ -94,11 +111,15 @@ class SyncWorkerInterface {
virtual void DetachFromSequence() = 0;
+ virtual void AddObserver(Observer* observer) = 0;
+
private:
friend class SyncEngineTest;
// TODO(peria): Remove this interface after making FakeSyncWorker class.
virtual void SetHasRefreshToken(bool has_refresh_token) = 0;
+
+ DISALLOW_COPY_AND_ASSIGN(SyncWorkerInterface);
};
} // namespace drive_backend
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_worker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698