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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_tab_helper.cc

Issue 10805051: Add RenderViewHost* to DidStartLoading and DidStopLoading in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" 5 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "chrome/browser/captive_portal/captive_portal_login_detector.h" 8 #include "chrome/browser/captive_portal/captive_portal_login_detector.h"
9 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h" 9 #include "chrome/browser/captive_portal/captive_portal_tab_reloader.h"
10 #include "chrome/browser/captive_portal/captive_portal_service_factory.h" 10 #include "chrome/browser/captive_portal/captive_portal_service_factory.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // May have been aborting the load of an error page. 114 // May have been aborting the load of an error page.
115 pending_error_code_ = net::OK; 115 pending_error_code_ = net::OK;
116 116
117 tab_reloader_->OnAbort(); 117 tab_reloader_->OnAbort();
118 return; 118 return;
119 } 119 }
120 120
121 pending_error_code_ = error_code; 121 pending_error_code_ = error_code;
122 } 122 }
123 123
124 void CaptivePortalTabHelper::DidStopLoading() { 124 void CaptivePortalTabHelper::DidStopLoading(
125 content::RenderViewHost* render_view_host) {
125 DCHECK(CalledOnValidThread()); 126 DCHECK(CalledOnValidThread());
126 127
127 login_detector_->OnStoppedLoading(); 128 login_detector_->OnStoppedLoading();
128 } 129 }
129 130
130 void CaptivePortalTabHelper::Observe( 131 void CaptivePortalTabHelper::Observe(
131 int type, 132 int type,
132 const content::NotificationSource& source, 133 const content::NotificationSource& source,
133 const content::NotificationDetails& details) { 134 const content::NotificationDetails& details) {
134 DCHECK(CalledOnValidThread()); 135 DCHECK(CalledOnValidThread());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Otherwise, open a login tab. Only end up here when a captive portal result 208 // Otherwise, open a login tab. Only end up here when a captive portal result
208 // was received, so it's safe to assume |profile_| has a CaptivePortalService. 209 // was received, so it's safe to assume |profile_| has a CaptivePortalService.
209 TabContents* tab_contents = chrome::AddSelectedTabWithURL( 210 TabContents* tab_contents = chrome::AddSelectedTabWithURL(
210 browser, 211 browser,
211 CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(), 212 CaptivePortalServiceFactory::GetForProfile(profile_)->test_url(),
212 content::PAGE_TRANSITION_TYPED); 213 content::PAGE_TRANSITION_TYPED);
213 tab_contents->captive_portal_tab_helper()->SetIsLoginTab(); 214 tab_contents->captive_portal_tab_helper()->SetIsLoginTab();
214 } 215 }
215 216
216 } // namespace captive_portal 217 } // namespace captive_portal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698