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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
===================================================================
--- chrome/browser/captive_portal/captive_portal_tab_helper.cc (revision 145001)
+++ chrome/browser/captive_portal/captive_portal_tab_helper.cc (working copy)
@@ -11,6 +11,7 @@
#include "chrome/browser/captive_portal/captive_portal_service_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/notification_details.h"
@@ -160,15 +161,15 @@
// TODO(mmenke): Consider focusing that tab, at least if this is the tab
// helper for the currently active tab for the profile.
for (int i = 0; i < browser->tab_count(); ++i) {
- TabContents* tab_contents = browser->GetTabContentsAt(i);
+ TabContents* tab_contents = chrome::GetTabContentsAt(browser, i);
if (tab_contents->captive_portal_tab_helper()->IsLoginTab())
return;
}
// Otherwise, open a login tab. Only end up here when a captive portal result
// was received, so it's safe to assume |profile_| has a CaptivePortalService.
- TabContents* tab_contents =
- browser->AddSelectedTabWithURL(
+ TabContents* tab_contents = chrome::AddSelectedTabWithURL(
+ browser,
CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(),
content::PAGE_TRANSITION_TYPED);
tab_contents->captive_portal_tab_helper()->SetIsLoginTab();
« no previous file with comments | « chrome/browser/captive_portal/captive_portal_browsertest.cc ('k') | chrome/browser/chrome_main_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698