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

Unified Diff: chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc

Issue 2505723002: Added check for profile loading completion.
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
diff --git a/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc b/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
index 182474e4d2c0a3631a72f1f86e6c2589fb782b6d..ed770356449878e20f549895d7a7e709a4ff2015 100644
--- a/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
+++ b/chrome/browser/chromeos/login/signin/merge_session_throttling_utils.cc
@@ -14,6 +14,7 @@
#include "base/time/time.h"
#include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h"
#include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/common/url_constants.h"
#include "components/google/core/browser/google_util.h"
#include "components/user_manager/user_manager.h"
@@ -105,6 +106,14 @@ void UnblockProfile(Profile* profile) {
bool ShouldDelayRequestForProfile(Profile* profile) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ if (!chromeos::ProfileHelper::Get()->GetUserByProfile(profile))
+ return false;
+
+ if (!chromeos::ProfileHelper::Get()->GetUserByProfile(profile)->
+ is_profile_created()) {
+ return false;
+ }
+
if (!user_manager::UserManager::Get()->IsUserLoggedIn()) {
return false;
} else if (!user_manager::UserManager::Get()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698