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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 component_factory_ = std::move(component_factory); | 487 component_factory_ = std::move(component_factory); |
488 } | 488 } |
489 | 489 |
490 // static | 490 // static |
491 void ChromeSyncClient::GetDeviceInfoTrackers( | 491 void ChromeSyncClient::GetDeviceInfoTrackers( |
492 std::vector<const sync_driver::DeviceInfoTracker*>* trackers) { | 492 std::vector<const sync_driver::DeviceInfoTracker*>* trackers) { |
493 DCHECK(trackers); | 493 DCHECK(trackers); |
494 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 494 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
495 std::vector<Profile*> profile_list = profile_manager->GetLoadedProfiles(); | 495 std::vector<Profile*> profile_list = profile_manager->GetLoadedProfiles(); |
496 for (Profile* profile : profile_list) { | 496 for (Profile* profile : profile_list) { |
497 const ProfileSyncService* profile_sync_service = | 497 const browser_sync::ProfileSyncService* profile_sync_service = |
498 ProfileSyncServiceFactory::GetForProfile(profile); | 498 ProfileSyncServiceFactory::GetForProfile(profile); |
499 if (profile_sync_service != nullptr) { | 499 if (profile_sync_service != nullptr) { |
500 const sync_driver::DeviceInfoTracker* tracker = | 500 const sync_driver::DeviceInfoTracker* tracker = |
501 profile_sync_service->GetDeviceInfoTracker(); | 501 profile_sync_service->GetDeviceInfoTracker(); |
502 if (tracker != nullptr) { | 502 if (tracker != nullptr) { |
503 // Even when sync is disabled and/or user is signed out, a tracker will | 503 // Even when sync is disabled and/or user is signed out, a tracker will |
504 // still be present. It will only be missing when the ProfileSyncService | 504 // still be present. It will only be missing when the ProfileSyncService |
505 // has not sufficiently initialized yet. | 505 // has not sufficiently initialized yet. |
506 trackers->push_back(tracker); | 506 trackers->push_back(tracker); |
507 } | 507 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 sync_service->RegisterDataTypeController( | 628 sync_service->RegisterDataTypeController( |
629 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 629 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
630 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); | 630 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); |
631 sync_service->RegisterDataTypeController( | 631 sync_service->RegisterDataTypeController( |
632 base::MakeUnique<SupervisedUserSyncDataTypeController>( | 632 base::MakeUnique<SupervisedUserSyncDataTypeController>( |
633 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); | 633 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); |
634 #endif | 634 #endif |
635 } | 635 } |
636 | 636 |
637 } // namespace browser_sync | 637 } // namespace browser_sync |
OLD | NEW |