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

Unified Diff: chrome/browser/ui/app_list/profile_loader.cc

Issue 856733004: Loading the Launcher with a Locked Profile launched UserManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted@: test fixes and remove a const-ref. Created 5 years, 11 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/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/ui/app_list/profile_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/profile_loader.cc
diff --git a/chrome/browser/ui/app_list/profile_loader.cc b/chrome/browser/ui/app_list/profile_loader.cc
index 40546f7c53a9b8a16e2e54e0121ffd0f58dd59fc..ec8d9a4e4103d1c7b1245cadd7d168a92cbd2ecf 100644
--- a/chrome/browser/ui/app_list/profile_loader.cc
+++ b/chrome/browser/ui/app_list/profile_loader.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "chrome/browser/apps/scoped_keep_alive.h"
#include "chrome/browser/ui/app_list/profile_store.h"
+#include "chrome/browser/ui/user_manager.h"
ProfileLoader::ProfileLoader(ProfileStore* profile_store)
: profile_store_(profile_store),
@@ -32,6 +33,13 @@ void ProfileLoader::LoadProfileInvalidatingOtherLoads(
base::Callback<void(Profile*)> callback) {
InvalidatePendingProfileLoads();
+ if (profile_store_->IsProfileLocked(profile_file_path)) {
+ UserManager::Show(base::FilePath(),
+ profiles::USER_MANAGER_NO_TUTORIAL,
+ profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER);
+ return;
+ }
+
Profile* profile = profile_store_->GetProfileByPath(profile_file_path);
if (profile) {
callback.Run(profile);
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/ui/app_list/profile_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698