Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: components/browser_sync/profile_sync_service.cc

Issue 2942473002: [sync] Don't show an error icon when sync isn't signed in (Closed)
Patch Set: make isSyncConfirmationNeeded virtual, add comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/browser_sync/profile_sync_service.h ('k') | components/sync/base/pref_names.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 !IsFirstSetupInProgress() && !IsFirstSetupComplete() && 791 return IsSignedIn() && !IsFirstSetupInProgress() && !IsFirstSetupComplete() &&
792 IsSyncRequested(); 792 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);
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 return; 2417 return;
2418 2418
2419 DCHECK(startup_controller_->IsSetupInProgress()); 2419 DCHECK(startup_controller_->IsSetupInProgress());
2420 startup_controller_->SetSetupInProgress(false); 2420 startup_controller_->SetSetupInProgress(false);
2421 2421
2422 if (IsEngineInitialized()) 2422 if (IsEngineInitialized())
2423 ReconfigureDatatypeManager(); 2423 ReconfigureDatatypeManager();
2424 NotifyObservers(); 2424 NotifyObservers();
2425 } 2425 }
2426 } // namespace browser_sync 2426 } // namespace browser_sync
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service.h ('k') | components/sync/base/pref_names.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698