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

Unified Diff: chrome/browser/captive_portal/captive_portal_tab_helper.cc

Issue 10967003: Add desktop type context to most existing instances of FindTabbedBrowser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moving check_deps exception to specific_include_rules after chat with Kai. Created 8 years, 2 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
Index: chrome/browser/captive_portal/captive_portal_tab_helper.cc
diff --git a/chrome/browser/captive_portal/captive_portal_tab_helper.cc b/chrome/browser/captive_portal/captive_portal_tab_helper.cc
index 797ab24cec4b9a61f98b3774b913f3dec0ab9b76..2937a2243a3692ba482fc2ae9c6fcb347336e5b2 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_helper.cc
+++ b/chrome/browser/captive_portal/captive_portal_tab_helper.cc
@@ -43,6 +43,7 @@ CaptivePortalTabHelper::CaptivePortalTabHelper(
base::Bind(&CaptivePortalTabHelper::OpenLoginTab,
base::Unretained(this)))),
login_detector_(new CaptivePortalLoginDetector(profile_)),
+ web_contents_(web_contents),
pending_error_code_(net::OK),
provisional_render_view_host_(NULL) {
registrar_.Add(this,
@@ -238,7 +239,8 @@ CaptivePortalTabReloader* CaptivePortalTabHelper::GetTabReloaderForTest() {
}
void CaptivePortalTabHelper::OpenLoginTab() {
- Browser* browser = browser::FindTabbedBrowser(profile_, true);
+ Browser* browser = browser::FindBrowserWithWebContents(web_contents_);
+
// If the Profile doesn't have a tabbed browser window open, do nothing.
if (!browser)
return;
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_tab_helper.h ('k') | chrome/browser/chromeos/enrollment_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698