OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ |
7 | 7 |
8 #include "chrome/browser/sync/glue/local_device_info_provider.h" | 8 #include "chrome/browser/sync/glue/local_device_info_provider.h" |
9 #include "components/sync_driver/ui_data_type_controller.h" | 9 #include "components/sync_driver/ui_data_type_controller.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace browser_sync { | 15 namespace browser_sync { |
16 | 16 |
17 class SyncedWindowDelegatesGetter; | 17 class SyncedWindowDelegatesGetter; |
18 | 18 |
19 // Overrides StartModels to avoid sync contention with sessions during | 19 // Overrides StartModels to avoid sync contention with sessions during |
20 // a session restore operation at startup and to wait for the local | 20 // a session restore operation at startup and to wait for the local |
21 // device info to become available. | 21 // device info to become available. |
22 class SessionDataTypeController : public UIDataTypeController, | 22 class SessionDataTypeController : public sync_driver::UIDataTypeController, |
23 public content::NotificationObserver { | 23 public content::NotificationObserver { |
24 public: | 24 public: |
25 SessionDataTypeController(SyncApiComponentFactory* factory, | 25 SessionDataTypeController(sync_driver::SyncApiComponentFactory* factory, |
26 Profile* profile, | 26 Profile* profile, |
27 SyncedWindowDelegatesGetter* synced_window_getter, | 27 SyncedWindowDelegatesGetter* synced_window_getter, |
28 LocalDeviceInfoProvider* local_device, | 28 LocalDeviceInfoProvider* local_device, |
29 const DisableTypeCallback& disable_callback); | 29 const DisableTypeCallback& disable_callback); |
30 | 30 |
31 // NotificationObserver interface. | 31 // NotificationObserver interface. |
32 virtual void Observe(int type, | 32 virtual void Observe(int type, |
33 const content::NotificationSource& source, | 33 const content::NotificationSource& source, |
34 const content::NotificationDetails& details) OVERRIDE; | 34 const content::NotificationDetails& details) OVERRIDE; |
35 | 35 |
(...skipping 19 matching lines...) Expand all Loading... |
55 bool waiting_on_session_restore_; | 55 bool waiting_on_session_restore_; |
56 bool waiting_on_local_device_info_; | 56 bool waiting_on_local_device_info_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController); | 58 DISALLOW_COPY_AND_ASSIGN(SessionDataTypeController); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace browser_sync | 61 } // namespace browser_sync |
62 | 62 |
63 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ | 63 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSION_DATA_TYPE_CONTROLLER_H_ |
64 | 64 |
OLD | NEW |