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

Unified Diff: chrome/browser/sync/syncable_service.h

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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/signin_manager.cc ('k') | chrome/browser/sync/syncable_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable_service.h
diff --git a/chrome/browser/sync/syncable_service.h b/chrome/browser/sync/syncable_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b06ea8401b1af197f134aadb24659d21e6c4203
--- /dev/null
+++ b/chrome/browser/sync/syncable_service.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2011 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_SYNCABLE_SERVICE_H_
+#define CHROME_BROWSER_SYNC_SYNCABLE_SERVICE_H_
+#pragma once
+
+#include "chrome/browser/sync/engine/syncapi.h" // TODO(zea): remove this.
+#include "chrome/browser/sync/glue/model_associator.h"
+
+class ProfileSyncService;
+
+namespace browser_sync {
+class GenericChangeProcessor;
+}
+
+// TODO(sync): Define SyncData type for passing sync changes here.
+
+// TODO(sync): Have this become an independent class and deprecate
+// AssociatorInterface.
+class SyncableService : public browser_sync::AssociatorInterface {
+ public:
+ SyncableService();
+ virtual ~SyncableService();
+
+ // Future methods for SyncableService:
+ // StartSyncing
+ // StopSyncing
+ // GetAllSyncData
+ // ProcessNewSyncData (replaces ApplyChangeFromSync)
+
+ // TODO(sync): remove these once we switch to the real SyncableService
+ // interface. This just keeps us going while we use the model associator/
+ // change processor way of things.
+
+ // AssociatorInterface implementation.
+ virtual bool AssociateModels() = 0;
+ virtual bool DisassociateModels() = 0;
+ virtual bool SyncModelHasUserCreatedNodes(bool* has_nodes) = 0;
+ virtual void AbortAssociation() = 0;
+ virtual bool CryptoReadyIfNecessary() = 0;
+
+ // Receive changes from change processor (the ChangeRecord dependency is
+ // the reason we must include syncapi.h).
+ virtual void ApplyChangesFromSync(
+ const sync_api::BaseTransaction* trans,
+ const sync_api::SyncManager::ChangeRecord* changes,
+ int change_count) = 0;
+ virtual void SetupSync(
+ ProfileSyncService* sync_service,
+ browser_sync::GenericChangeProcessor* change_processor) = 0;
+};
+
+#endif // CHROME_BROWSER_SYNC_SYNCABLE_SERVICE_H_
« no previous file with comments | « chrome/browser/sync/signin_manager.cc ('k') | chrome/browser/sync/syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698