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

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: fix cros Created 6 years, 9 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_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 f703c82d7533861a003a8282bb07d12495c51fe5..58a4863978761d225ec7f7cf40416ad946c97a1b 100644
--- a/chrome/browser/ui/app_list/app_list_service_mac.mm
+++ b/chrome/browser/ui/app_list/app_list_service_mac.mm
@@ -383,10 +383,11 @@ Profile* AppListServiceMac::GetCurrentAppListProfile() {
}
void AppListServiceMac::CreateForProfile(Profile* requested_profile) {
- if (profile_ == requested_profile)
+ DCHECK(requested_profile);
+ if (profile_ && requested_profile->IsSameProfile(profile_))
return;
- profile_ = requested_profile;
+ profile_ = requested_profile->GetOriginalProfile();
if (!window_controller_)
window_controller_.reset([[AppListWindowController alloc] init]);
@@ -402,7 +403,7 @@ void AppListServiceMac::ShowForProfile(Profile* requested_profile) {
InvalidatePendingProfileLoads();
- if (requested_profile == profile_) {
+ if (profile_ && requested_profile->IsSameProfile(profile_)) {
ShowWindowNearDock();
return;
}

Powered by Google App Engine
This is Rietveld 408576698