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]); |