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

Unified Diff: chrome/browser/ui/network_profile_bubble.cc

Issue 10887021: Remove GetLastActive from NetworkProfileBubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698