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 #include "components/sync_sessions/session_data_type_controller.h" | 5 #include "components/sync_sessions/session_data_type_controller.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "components/prefs/pref_service.h" | 9 #include "components/prefs/pref_service.h" |
10 #include "components/sync/driver/sync_client.h" | 10 #include "components/sync/driver/sync_client.h" |
11 #include "components/sync_sessions/sync_sessions_client.h" | 11 #include "components/sync_sessions/sync_sessions_client.h" |
12 #include "components/sync_sessions/synced_window_delegate.h" | 12 #include "components/sync_sessions/synced_window_delegate.h" |
13 #include "components/sync_sessions/synced_window_delegates_getter.h" | 13 #include "components/sync_sessions/synced_window_delegates_getter.h" |
14 | 14 |
15 namespace sync_sessions { | 15 namespace sync_sessions { |
16 | 16 |
17 SessionDataTypeController::SessionDataTypeController( | 17 SessionDataTypeController::SessionDataTypeController( |
18 const base::Closure& dump_stack, | 18 const base::Closure& dump_stack, |
19 syncer::SyncClient* sync_client, | 19 sync_driver::SyncClient* sync_client, |
20 syncer::LocalDeviceInfoProvider* local_device, | 20 sync_driver::LocalDeviceInfoProvider* local_device, |
21 const char* history_disabled_pref_name) | 21 const char* history_disabled_pref_name) |
22 : UIDataTypeController(syncer::SESSIONS, dump_stack, sync_client), | 22 : UIDataTypeController(syncer::SESSIONS, dump_stack, sync_client), |
23 sync_client_(sync_client), | 23 sync_client_(sync_client), |
24 local_device_(local_device), | 24 local_device_(local_device), |
25 history_disabled_pref_name_(history_disabled_pref_name), | 25 history_disabled_pref_name_(history_disabled_pref_name), |
26 waiting_on_session_restore_(false), | 26 waiting_on_session_restore_(false), |
27 waiting_on_local_device_info_(false) { | 27 waiting_on_local_device_info_(false) { |
28 DCHECK(local_device_); | 28 DCHECK(local_device_); |
29 pref_registrar_.Init(sync_client_->GetPrefService()); | 29 pref_registrar_.Init(sync_client_->GetPrefService()); |
30 pref_registrar_.Add( | 30 pref_registrar_.Add( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 syncer::SyncError error( | 104 syncer::SyncError error( |
105 FROM_HERE, syncer::SyncError::DATATYPE_POLICY_ERROR, | 105 FROM_HERE, syncer::SyncError::DATATYPE_POLICY_ERROR, |
106 "History and tab saving is now disabled by policy.", | 106 "History and tab saving is now disabled by policy.", |
107 syncer::SESSIONS); | 107 syncer::SESSIONS); |
108 CreateErrorHandler()->OnUnrecoverableError(error); | 108 CreateErrorHandler()->OnUnrecoverableError(error); |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 } // namespace sync_sessions | 113 } // namespace sync_sessions |
OLD | NEW |