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

Unified Diff: chrome/browser/sync/glue/new_non_frontend_data_type_controller.h

Issue 8065016: [Sync] Refactor non-frontend DTC to handle new API properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reffffactor Created 9 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/glue/new_non_frontend_data_type_controller.h
diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..22f3b9166bf592dd0af09db6b47de4cb9276cf2c
--- /dev/null
+++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
@@ -0,0 +1,62 @@
+// 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_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_
+#define CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_
+#pragma once
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
+#include "chrome/browser/sync/glue/shared_change_processor.h"
+#include "chrome/browser/sync/util/weak_handle.h"
+
+class SyncableService;
+
+namespace sync_api {
+struct UserShare;
+}
+
+namespace browser_sync {
+
+class NewNonFrontendDataTypeController : public NonFrontendDataTypeController {
+ public:
+ NewNonFrontendDataTypeController(
+ ProfileSyncFactory* profile_sync_factory,
+ Profile* profile);
+ virtual ~NewNonFrontendDataTypeController();
+
+ virtual void Start(StartCallback* start_callback) OVERRIDE;
+ virtual void Stop() OVERRIDE;
+
+ protected:
+ NewNonFrontendDataTypeController();
+
+ // Override's of NonFrontendDataTypeController methods.
+ virtual void StartAssociation() OVERRIDE;
+ virtual void StartDone(DataTypeController::StartResult result,
+ DataTypeController::State new_state,
+ const SyncError& error) OVERRIDE;
+
+ // Extract/create the syncable service from the profile and return a
+ // WeakHandle to it.
+ virtual WeakHandle<SyncableService> GetWeakHandleToSyncableService()
+ const = 0;
+
+ private:
+ // Deprecated.
+ virtual bool StopAssociationAsync() OVERRIDE;
+ virtual void CreateSyncComponents() OVERRIDE;
+
+ sync_api::UserShare* user_share_;
+
+ // A weak handle to the actual local syncable service, which performs all the
+ // real work. We do not own the object.
+ WeakHandle<SyncableService> local_service_;
+
+ scoped_refptr<SharedChangeProcessor> shared_change_processor_;
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698