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

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

Issue 11187021: Add RemoteFileSyncService interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & fix comment Created 8 years, 2 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/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
new file mode 100644
index 0000000000000000000000000000000000000000..fb526abc1955873d85acb8380b76c1f38363c976
--- /dev/null
+++ b/chrome/browser/sync_file_system/remote_file_sync_service.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
+#define CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
+
+#include "base/basictypes.h"
+#include "base/observer_list.h"
Lei Zhang 2012/10/24 05:53:19 nit: not needed
tzik 2012/10/24 06:43:11 Done.
+#include "webkit/fileapi/syncable/sync_callbacks.h"
+
+class GURL;
+
+namespace sync_file_system {
+
+class RemoteChangeObserver;
+class RemoteChangeProcessor;
+
+// This class represents a backing service of the sync filesystem.
+// Owned by SyncFileSystemService.
+class RemoteFileSyncService {
+ public:
+ RemoteFileSyncService() {}
+ virtual ~RemoteFileSyncService() {}
+
+ virtual void AddObserver(RemoteChangeObserver* observer) = 0;
+ virtual void RemoveObserver(RemoteChangeObserver* observer) = 0;
+
+ // Registers |origin| to track remote side changes for the |origin|.
+ virtual void RegisterOriginForTrackingChanges(const GURL& origin) = 0;
+
+ // Unregisters |origin| to track remote side changes for the |origin|.
+ virtual void UnregisterOriginForTrackingChanges(const GURL& origin) = 0;
+
+ // Called by the sync engine to process one remote change.
+ // After a change is processed |callback| will be called (to return
+ // the control to the sync engine).
+ virtual void ProcessChange(RemoteChangeProcessor* processor,
+ fileapi::SyncCompletionCallback& callback) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RemoteFileSyncService);
+};
+
+} // namespace sync_file_system
+
+#endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_REMOTE_FILE_SYNC_SERVICE_H_
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/sync_file_system_service.h » ('j') | webkit/fileapi/syncable/sync_callbacks.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698