| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/browser_sync/profile_sync_service.h" | 5 #include "components/browser_sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 void ProfileSyncService::SetFirstSetupComplete() { | 781 void ProfileSyncService::SetFirstSetupComplete() { |
| 782 DCHECK(thread_checker_.CalledOnValidThread()); | 782 DCHECK(thread_checker_.CalledOnValidThread()); |
| 783 sync_prefs_.SetFirstSetupComplete(); | 783 sync_prefs_.SetFirstSetupComplete(); |
| 784 if (IsEngineInitialized()) { | 784 if (IsEngineInitialized()) { |
| 785 ReconfigureDatatypeManager(); | 785 ReconfigureDatatypeManager(); |
| 786 } | 786 } |
| 787 } | 787 } |
| 788 | 788 |
| 789 bool ProfileSyncService::IsSyncConfirmationNeeded() const { | 789 bool ProfileSyncService::IsSyncConfirmationNeeded() const { |
| 790 DCHECK(thread_checker_.CalledOnValidThread()); | 790 DCHECK(thread_checker_.CalledOnValidThread()); |
| 791 return IsSignedIn() && !IsFirstSetupInProgress() && !IsFirstSetupComplete() && | 791 return (!IsLocalSyncEnabled() && IsSignedIn()) && !IsFirstSetupInProgress() && |
| 792 IsSyncRequested(); | 792 !IsFirstSetupComplete() && IsSyncRequested(); |
| 793 } | 793 } |
| 794 | 794 |
| 795 void ProfileSyncService::UpdateLastSyncedTime() { | 795 void ProfileSyncService::UpdateLastSyncedTime() { |
| 796 sync_prefs_.SetLastSyncedTime(base::Time::Now()); | 796 sync_prefs_.SetLastSyncedTime(base::Time::Now()); |
| 797 } | 797 } |
| 798 | 798 |
| 799 void ProfileSyncService::NotifySyncCycleCompleted() { | 799 void ProfileSyncService::NotifySyncCycleCompleted() { |
| 800 for (auto& observer : observers_) | 800 for (auto& observer : observers_) |
| 801 observer.OnSyncCycleCompleted(this); | 801 observer.OnSyncCycleCompleted(this); |
| 802 } | 802 } |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2428 return; | 2428 return; |
| 2429 | 2429 |
| 2430 DCHECK(startup_controller_->IsSetupInProgress()); | 2430 DCHECK(startup_controller_->IsSetupInProgress()); |
| 2431 startup_controller_->SetSetupInProgress(false); | 2431 startup_controller_->SetSetupInProgress(false); |
| 2432 | 2432 |
| 2433 if (IsEngineInitialized()) | 2433 if (IsEngineInitialized()) |
| 2434 ReconfigureDatatypeManager(); | 2434 ReconfigureDatatypeManager(); |
| 2435 NotifyObservers(); | 2435 NotifyObservers(); |
| 2436 } | 2436 } |
| 2437 } // namespace browser_sync | 2437 } // namespace browser_sync |
| OLD | NEW |