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

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

Issue 242483003: Move CaptivePortalDetector to src/components/captive_portal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 9b32a0cc8d5c56b8c69551940f371f6073b33df6..d939bdaec5a99cb906a6acea4c9fc02fa199e557 100644
--- a/chrome/browser/captive_portal/captive_portal_tab_helper.cc
+++ b/chrome/browser/captive_portal/captive_portal_tab_helper.cc
@@ -25,9 +25,9 @@
#include "net/base/net_errors.h"
#include "net/ssl/ssl_info.h"
-DEFINE_WEB_CONTENTS_USER_DATA_KEY(captive_portal::CaptivePortalTabHelper);
+using captive_portal::CaptivePortalResult;
-namespace captive_portal {
+DEFINE_WEB_CONTENTS_USER_DATA_KEY(CaptivePortalTabHelper);
CaptivePortalTabHelper::CaptivePortalTabHelper(
content::WebContents* web_contents)
@@ -210,8 +210,9 @@ void CaptivePortalTabHelper::OnRedirect(int child_id,
tab_reloader_->OnRedirect(new_url.SchemeIsSecure());
}
-void CaptivePortalTabHelper::OnCaptivePortalResults(Result previous_result,
- Result result) {
+void CaptivePortalTabHelper::OnCaptivePortalResults(
+ CaptivePortalResult previous_result,
+ CaptivePortalResult result) {
tab_reloader_->OnCaptivePortalResults(previous_result, result);
login_detector_->OnCaptivePortalResults(previous_result, result);
}
@@ -252,8 +253,8 @@ void CaptivePortalTabHelper::OpenLoginTab() {
for (int i = 0; i < browser->tab_strip_model()->count(); ++i) {
content::WebContents* web_contents =
browser->tab_strip_model()->GetWebContentsAt(i);
- captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper =
- captive_portal::CaptivePortalTabHelper::FromWebContents(web_contents);
+ CaptivePortalTabHelper* captive_portal_tab_helper =
+ CaptivePortalTabHelper::FromWebContents(web_contents);
if (captive_portal_tab_helper->IsLoginTab())
return;
}
@@ -264,9 +265,7 @@ void CaptivePortalTabHelper::OpenLoginTab() {
browser,
CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(),
content::PAGE_TRANSITION_TYPED);
- captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper =
- captive_portal::CaptivePortalTabHelper::FromWebContents(web_contents);
+ CaptivePortalTabHelper* captive_portal_tab_helper =
+ CaptivePortalTabHelper::FromWebContents(web_contents);
captive_portal_tab_helper->SetIsLoginTab();
}
-
-} // namespace captive_portal

Powered by Google App Engine
This is Rietveld 408576698