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

Side by Side Diff: chrome/browser/signin/signin_tracker.cc

Issue 10335015: Treat SyncCredentialsLost as an auth error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/signin/signin_tracker_unittest.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 "chrome/browser/signin/signin_tracker.h" 5 #include "chrome/browser/signin/signin_tracker.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/token_service.h" 8 #include "chrome/browser/signin/token_service.h"
9 #include "chrome/browser/signin/token_service_factory.h" 9 #include "chrome/browser/signin/token_service_factory.h"
10 #include "chrome/browser/sync/profile_sync_service.h" 10 #include "chrome/browser/sync/profile_sync_service.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 return true; 168 return true;
169 } 169 }
170 170
171 // static 171 // static
172 bool SigninTracker::AreServicesSignedIn(Profile* profile) { 172 bool SigninTracker::AreServicesSignedIn(Profile* profile) {
173 if (!AreServiceTokensLoaded(profile)) 173 if (!AreServiceTokensLoaded(profile))
174 return false; 174 return false;
175 ProfileSyncService* service = 175 ProfileSyncService* service =
176 ProfileSyncServiceFactory::GetForProfile(profile); 176 ProfileSyncServiceFactory::GetForProfile(profile);
177 return (service->AreCredentialsAvailable() && 177 return (service->IsSyncEnabledAndLoggedIn() &&
178 service->IsSyncTokenAvailable() &&
178 service->GetAuthError().state() == GoogleServiceAuthError::NONE && 179 service->GetAuthError().state() == GoogleServiceAuthError::NONE &&
179 !service->unrecoverable_error_detected()); 180 !service->unrecoverable_error_detected());
180 } 181 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/signin_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698