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

Unified Diff: chrome/browser/ui/app_list/app_list_service_mac.mm

Issue 219383006: Never create an app list for an incognito profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
Index: chrome/browser/ui/app_list/app_list_service_mac.mm
diff --git a/chrome/browser/ui/app_list/app_list_service_mac.mm b/chrome/browser/ui/app_list/app_list_service_mac.mm
index 0dac38473e13d189cc6a2a0caf4647a3b98ddd97..8f9a10511dd1b1b3bea95a1287862e0bd1698c8a 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -384,14 +384,6 @@ Profile* AppListServiceMac::GetCurrentAppListProfile() {
}
void AppListServiceMac::ShowForProfile(Profile* requested_profile) {
- InvalidatePendingProfileLoads();
-
- if (requested_profile == profile_) {
- ShowWindowNearDock();
- return;
- }
-
- SetProfilePath(requested_profile->GetPath());
CreateForProfile(requested_profile);
ShowWindowNearDock();
}
@@ -439,10 +431,13 @@ void AppListServiceMac::CreateShortcut() {
}
void AppListServiceMac::CreateForProfile(Profile* requested_profile) {
- if (profile_ == requested_profile)
+ DCHECK(requested_profile);
+ InvalidatePendingProfileLoads();
+ if (profile_ && requested_profile->IsSameProfile(profile_))
return;
- profile_ = requested_profile;
+ profile_ = requested_profile->GetOriginalProfile();
+ SetProfilePath(profile_->GetPath());
if (!window_controller_)
window_controller_.reset([[AppListWindowController alloc] init]);
« no previous file with comments | « chrome/browser/ui/app_list/app_list_controller_browsertest.cc ('k') | chrome/browser/ui/app_list/app_list_service_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698