Chromium Code Reviews| Index: chrome/browser/ui/network_profile_bubble.cc |
| diff --git a/chrome/browser/ui/network_profile_bubble.cc b/chrome/browser/ui/network_profile_bubble.cc |
| index 5d57c82bde98db8b8d0927232ab834971a10a7ab..3bf9091c0e8fcd8d0926580de63b170570afdba0 100644 |
| --- a/chrome/browser/ui/network_profile_bubble.cc |
| +++ b/chrome/browser/ui/network_profile_bubble.cc |
| @@ -20,6 +20,7 @@ |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| #include "chrome/browser/profiles/profile.h" |
| +#include "chrome/browser/ui/browser_finder.h" |
| #include "chrome/browser/ui/browser_list.h" |
| #include "chrome/browser/ui/browser_list_observer.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -172,8 +173,11 @@ void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) { |
| // static |
| void NetworkProfileBubble::NotifyNetworkProfileDetected() { |
| - if (BrowserList::GetLastActive()) |
| - ShowNotification(BrowserList::GetLastActive()); |
| + Browser* browser = browser::FindLastActiveWithHostDesktopType( |
| + chrome::HOST_DESKTOP_TYPE_NATIVE); |
|
MAD
2012/08/30 13:45:22
Shouldn't we have a TODO here (or in chrome_browse
|
| + |
| + if (browser) |
| + ShowNotification(browser); |
| else |
| BrowserList::AddObserver(new BrowserListObserver()); |
| } |