1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/sync/glue/frontend_data_type_controller.h"
12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h"
15 namespace browser_sync {
17 class SessionModelAssociator;
19 class SessionDataTypeController : public FrontendDataTypeController,
20 public content::NotificationObserver {
22 SessionDataTypeController(
23 ProfileSyncComponentsFactory* profile_sync_factory,
25 ProfileSyncService* sync_service);
27 SessionModelAssociator* GetModelAssociator();
29 // FrontendDataTypeController implementation.
30 virtual syncer::ModelType type() const OVERRIDE;
32 // NotificationObserver interface.
33 virtual void Observe(int type,
34 const content::NotificationSource& source,
35 const content::NotificationDetails& details) OVERRIDE;
38 virtual ~SessionDataTypeController();
40 // FrontendDataTypeController implementations.
41 virtual bool StartModels() OVERRIDE;
42 virtual void CleanUpState() OVERRIDE;
43 // Datatype specific creation of sync components.
44 virtual void CreateSyncComponents() OVERRIDE;
46 content::NotificationRegistrar notification_registrar_;
48 DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController);
51 } // namespace browser_sync
53 #endif // CHROME_BROWSER_SYNC_GLUE_SESSION_DATA_TYPE_CONTROLLER_H_