Index: chrome/browser/ui/app_list/app_list_shower.cc |
diff --git a/chrome/browser/ui/app_list/app_list_shower.cc b/chrome/browser/ui/app_list/app_list_shower.cc |
index 973827a4508fdd8f9cc882907b3f0d5fe154d386..de466cb5e617756bb3c38e664d04d1fe7b66aaa4 100644 |
--- a/chrome/browser/ui/app_list/app_list_shower.cc |
+++ b/chrome/browser/ui/app_list/app_list_shower.cc |
@@ -4,6 +4,7 @@ |
#include "base/bind.h" |
#include "base/message_loop/message_loop.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/app_list/app_list_shower.h" |
AppListShower::AppListShower(scoped_ptr<AppListFactory> factory, |
@@ -27,16 +28,18 @@ void AppListShower::ShowAndReacquireFocus(Profile* requested_profile) { |
void AppListShower::ShowForProfile(Profile* requested_profile) { |
// If the app list is already displaying |profile| just activate it (in case |
// we have lost focus). |
- if (IsAppListVisible() && (requested_profile == profile_)) { |
+ if (IsAppListVisible() && (requested_profile->IsSameProfile(profile_))) { |
+ DCHECK(profile_); |
benwells
2014/10/09 05:32:33
Are these DCHECKs related to this change or just g
tapted
2014/10/09 05:52:01
semi-related. They're not being added because I ti
|
app_list_->Show(); |
return; |
} |
if (!app_list_) { |
CreateViewForProfile(requested_profile); |
- } else if (requested_profile != profile_) { |
- profile_ = requested_profile; |
- app_list_->SetProfile(requested_profile); |
+ } else if (!requested_profile->IsSameProfile(profile_)) { |
+ DCHECK(profile_); |
+ profile_ = requested_profile->GetOriginalProfile(); |
+ app_list_->SetProfile(profile_); |
} |
keep_alive_service_->EnsureKeepAlive(); |
@@ -52,7 +55,7 @@ gfx::NativeWindow AppListShower::GetWindow() { |
} |
void AppListShower::CreateViewForProfile(Profile* requested_profile) { |
- profile_ = requested_profile; |
+ profile_ = requested_profile->GetOriginalProfile(); |
app_list_.reset(factory_->CreateAppList( |
profile_, |
service_, |