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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 479353003: Add IsAuthenticated() method to SigninManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/app_list/search/people/people_result.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 3e1b39cabcbc95af839147a0ae161f51099f5cf3..84a2ed54e1698241d9119d0ee9a7139ee35d587d 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -274,8 +274,7 @@ void SyncEngine::Reset() {
void SyncEngine::Initialize() {
Reset();
- if (!signin_manager_ ||
- signin_manager_->GetAuthenticatedAccountId().empty())
+ if (!signin_manager_ || !signin_manager_->IsAuthenticated())
return;
DCHECK(drive_service_factory_);
@@ -380,8 +379,7 @@ void SyncEngine::RegisterOrigin(const GURL& origin,
if (!sync_worker_) {
// TODO(tzik): Record |origin| and retry the registration after late
// sign-in. Then, return SYNC_STATUS_OK.
- if (!signin_manager_ ||
- signin_manager_->GetAuthenticatedAccountId().empty())
+ if (!signin_manager_ || !signin_manager_->IsAuthenticated())
callback.Run(SYNC_STATUS_AUTHENTICATION_FAILED);
else
callback.Run(SYNC_STATUS_ABORT);
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/app_list/search/people/people_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698