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

Unified Diff: chrome/browser/ui/app_list/app_list_service_impl.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
Index: chrome/browser/ui/app_list/app_list_service_impl.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_impl.cc b/chrome/browser/ui/app_list/app_list_service_impl.cc
index 8b5c91422bc3020ad6c4d5bd64f7bb065c7ddcbf..3808fee61706a952be5251d787ac969d2737f888 100644
--- a/chrome/browser/ui/app_list/app_list_service_impl.cc
+++ b/chrome/browser/ui/app_list/app_list_service_impl.cc
@@ -123,6 +123,7 @@ class ProfileStoreImpl : public ProfileStore {
}
Profile* GetProfileByPath(const base::FilePath& path) override {
+ DCHECK(!IsProfileLocked(path));
return profile_manager_->GetProfileByPath(path);
}
@@ -138,6 +139,14 @@ class ProfileStoreImpl : public ProfileStore {
profile_info.ProfileIsSupervisedAtIndex(profile_index);
}
+ bool IsProfileLocked(const base::FilePath& profile_path) override {
+ ProfileInfoCache& profile_info =
+ g_browser_process->profile_manager()->GetProfileInfoCache();
+ size_t profile_index = profile_info.GetIndexOfProfileWithPath(profile_path);
+ return profile_index != std::string::npos &&
+ profile_info.ProfileIsSigninRequiredAtIndex(profile_index);
+ }
+
private:
ProfileManager* profile_manager_;
base::WeakPtrFactory<ProfileStoreImpl> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698