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

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: Adding TODO as per MAD. 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..de922c9057f4a00777d663ac937fea1167daf50c 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,14 @@ void NetworkProfileBubble::RecordUmaEvent(MetricNetworkedProfileCheck event) {
// static
void NetworkProfileBubble::NotifyNetworkProfileDetected() {
- if (BrowserList::GetLastActive())
- ShowNotification(BrowserList::GetLastActive());
+ // TODO(robertshield): Eventually, we will need to figure out the correct
+ // desktop type for this for platforms that can have
+ // multiple desktop types (win8/metro).
+ Browser* browser = browser::FindLastActiveWithHostDesktopType(
+ chrome::HOST_DESKTOP_TYPE_NATIVE);
+
+ 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