| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/sync/chrome_sync_client.h" | 5 #include "chrome/browser/sync/chrome_sync_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 | 186 |
| 187 sync_sessions::LocalSessionEventRouter* GetLocalSessionEventRouter() | 187 sync_sessions::LocalSessionEventRouter* GetLocalSessionEventRouter() |
| 188 override { | 188 override { |
| 189 syncer::SyncableService::StartSyncFlare flare( | 189 syncer::SyncableService::StartSyncFlare flare( |
| 190 sync_start_util::GetFlareForSyncableService(profile_->GetPath())); | 190 sync_start_util::GetFlareForSyncableService(profile_->GetPath())); |
| 191 sync_sessions::SyncSessionsWebContentsRouter* router = | 191 sync_sessions::SyncSessionsWebContentsRouter* router = |
| 192 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile( | 192 sync_sessions::SyncSessionsWebContentsRouterFactory::GetForProfile( |
| 193 profile_); | 193 profile_); |
| 194 router->InjectStartSyncFlare(flare); | 194 router->InjectStartSyncFlare(flare); |
| 195 router->SetSyncSessionsClient(this); |
| 195 return router; | 196 return router; |
| 196 } | 197 } |
| 197 | 198 |
| 198 private: | 199 private: |
| 199 Profile* profile_; | 200 Profile* profile_; |
| 200 std::unique_ptr<sync_sessions::SyncedWindowDelegatesGetter> | 201 std::unique_ptr<sync_sessions::SyncedWindowDelegatesGetter> |
| 201 window_delegates_getter_; | 202 window_delegates_getter_; |
| 202 | 203 |
| 203 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl); | 204 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl); |
| 204 }; | 205 }; |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 sync_service->RegisterDataTypeController( | 707 sync_service->RegisterDataTypeController( |
| 707 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 708 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 708 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 709 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
| 709 sync_service->RegisterDataTypeController( | 710 sync_service->RegisterDataTypeController( |
| 710 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 711 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
| 711 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 712 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
| 712 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) | 713 #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 713 } | 714 } |
| 714 | 715 |
| 715 } // namespace browser_sync | 716 } // namespace browser_sync |
| OLD | NEW |