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

Issue 10020051: Open a login tab on captive portal detection on SSL loads. (Closed)

Created:
8 years, 8 months ago by mmenke
Modified:
8 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, creis+watch_chromium.org, ajwong+watch_chromium.org, jam, Avi (use Gerrit), joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Captive portals intercept all HTTP requests until the user has logged in, like at Starbucks and airports. When behind one, all SSL requests timeout after a potentially substantial delay. This CL Adds a CaptivePortalTabHelper which triggers captive portal checks when an SSL load is taking too long. If a captive portal is found, opens a login tab. Whenever the new tab is navigated, we check again for a captive portal. Once we discover the portal is gone, we reload the original tab. design doc: https://docs.google.com/a/chromium.org/document/d/1k-gP2sswzYNvryu9NcgN7q5XrsMlUdlUdoW9WRaEmfM/edit R=cbentzel@chromium.org,avi@chromium.org BUG=87100, 115487 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=142242

Patch Set 1 : #

Patch Set 2 : #

Total comments: 26

Patch Set 3 : Add NULL CaptivePortalService check #

Total comments: 12

Patch Set 4 : Response to comments #

Patch Set 5 : Response to comments #

Patch Set 6 : Sync #

Patch Set 7 : #

Patch Set 8 : Cleanup, update browser_tests #

Patch Set 9 : More unit test cleanup, fix minor Link Doctor bug #

Patch Set 10 : More browser test cleanup #

Patch Set 11 : More browser test cleanup #

Patch Set 12 : Sync, fix build #

Patch Set 13 : Fix unit tests #

Patch Set 14 : Fix browser_tests (oops) #

Patch Set 15 : Add missing file #

Total comments: 6

Patch Set 16 : response to comments #

Patch Set 17 : cleanup comment #

Total comments: 17

Patch Set 18 : Response to comments #

Patch Set 19 : Add file to fix component build #

Total comments: 6

Patch Set 20 : Rename files #

Patch Set 21 : Response to comments #

Patch Set 22 : Add missing files, update gyps #

Patch Set 23 : Update comments #

Total comments: 32

Patch Set 24 : Response to comments #

Patch Set 25 : Sync, update includes accordingly #

Patch Set 26 : Response to comments #

Total comments: 2

Patch Set 27 : Add missing file #

Patch Set 28 : Sync #

Total comments: 2

Patch Set 29 : Fix typo in comment, forward declare CaptivePortalTabReloader in the TabHelper #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3285 lines, -1 line) Patch
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +10 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1693 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_login_detector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +48 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_login_detector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/browser/captive_portal/captive_portal_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +120 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +177 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +301 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_reloader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +171 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_reloader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +233 lines, -0 lines 0 comments Download
A chrome/browser/captive_portal/captive_portal_tab_reloader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +404 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_dependency_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +13 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +13 lines, -0 lines 0 comments Download
A chrome/test/data/captive_portal/iframe_timeout.html View 1 2 3 4 5 6 7 20 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/test/data/captive_portal/login.html View 1 2 3 4 5 6 7 20 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/test/data/captive_portal/login.html.mock-http-headers View 1 2 3 4 5 6 7 20 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/data/captive_portal/page204.html View 1 2 3 4 5 6 7 20 1 chunk +1 line, -0 lines 0 comments Download
A chrome/test/data/captive_portal/page204.html.mock-http-headers View 1 2 3 4 5 6 7 20 1 chunk +3 lines, -0 lines 0 comments Download
M content/test/net/url_request_mock_http_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +1 line, -0 lines 0 comments Download
M content/test/net/url_request_mock_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (0 generated)
mmenke
Here's the other half of the CL, without browser tests yet (Though with a number ...
8 years, 8 months ago (2012-04-17 15:32:02 UTC) #1
cbentzel
Will review by early tomorrow. Gave another round of comments on the CapitvePortalService CL.
8 years, 8 months ago (2012-04-17 21:28:08 UTC) #2
cbentzel
Why do you need both a CaptivePortalTabObserver and Helper? http://codereview.chromium.org/10020051/diff/3005/chrome/browser/captive_portal/captive_portal_tab_helper.cc File chrome/browser/captive_portal/captive_portal_tab_helper.cc (right): http://codereview.chromium.org/10020051/diff/3005/chrome/browser/captive_portal/captive_portal_tab_helper.cc#newcode271 chrome/browser/captive_portal/captive_portal_tab_helper.cc:271: ...
8 years, 8 months ago (2012-04-18 14:36:31 UTC) #3
mmenke
Mostly to keep the number of times when CaptivePortalService could broadcast results down to a ...
8 years, 8 months ago (2012-04-18 14:38:52 UTC) #4
mmenke
http://codereview.chromium.org/10020051/diff/3005/chrome/browser/captive_portal/captive_portal_tab_helper.cc File chrome/browser/captive_portal/captive_portal_tab_helper.cc (right): http://codereview.chromium.org/10020051/diff/3005/chrome/browser/captive_portal/captive_portal_tab_helper.cc#newcode271 chrome/browser/captive_portal/captive_portal_tab_helper.cc:271: CaptivePortalServiceFactory::GetForProfile(profile_)->CheckForCaptivePortal(); On 2012/04/18 14:36:31, cbentzel wrote: > Is this ...
8 years, 8 months ago (2012-04-18 14:40:41 UTC) #5
cbentzel
This is a more complex state machine than I initially envisioned - and you aren't ...
8 years, 8 months ago (2012-04-18 15:12:48 UTC) #6
cbentzel
On Wed, Apr 18, 2012 at 11:12 AM, <cbentzel@chromium.org> wrote: > This is a more ...
8 years, 8 months ago (2012-04-18 15:16:04 UTC) #7
cbentzel
I like the tests. Looks like you are getting pretty good coverage. http://codereview.chromium.org/10020051/diff/3005/chrome/browser/captive_portal/captive_portal_tab_helper.cc File chrome/browser/captive_portal/captive_portal_tab_helper.cc ...
8 years, 8 months ago (2012-04-18 15:57:23 UTC) #8
mmenke
Suggest you hold off on re-reviewing this half of the captive portal stuff until I've ...
8 years, 8 months ago (2012-04-18 19:15:46 UTC) #9
cbentzel
I'll hold off a final review until browser_tests are in. But I don't see any ...
8 years, 8 months ago (2012-04-18 21:12:37 UTC) #10
mmenke
http://codereview.chromium.org/10020051/diff/14002/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc File chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc (right): http://codereview.chromium.org/10020051/diff/14002/chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc#newcode99 chrome/browser/captive_portal/captive_portal_tab_helper_unittest.cc:99: Profile* fake_profile() { return reinterpret_cast<Profile*>(17); } On 2012/04/18 21:12:37, ...
8 years, 8 months ago (2012-04-19 15:26:25 UTC) #11
cbentzel
Is this ready for more of a review now that the CaptivePortalService is pretty close ...
8 years, 7 months ago (2012-05-03 19:38:26 UTC) #12
mmenke
On 2012/05/03 19:38:26, cbentzel wrote: > Is this ready for more of a review now ...
8 years, 7 months ago (2012-05-03 21:55:47 UTC) #13
mmenke
On 2012/05/03 21:55:47, Matt Menke wrote: > On 2012/05/03 19:38:26, cbentzel wrote: > > Is ...
8 years, 7 months ago (2012-05-03 22:23:07 UTC) #14
mmenke
On 2012/05/03 22:23:07, Matt Menke wrote: > On 2012/05/03 21:55:47, Matt Menke wrote: > > ...
8 years, 7 months ago (2012-05-03 22:24:57 UTC) #15
cbentzel
On 2012/05/03 22:24:57, Matt Menke wrote: > On 2012/05/03 22:23:07, Matt Menke wrote: > > ...
8 years, 7 months ago (2012-05-15 01:16:56 UTC) #16
mmenke
PTAL, when you get a chance.
8 years, 7 months ago (2012-05-17 17:01:48 UTC) #17
cbentzel
Need to go through this some more. Does this handle HSTS style redirects? In that ...
8 years, 7 months ago (2012-05-17 20:39:25 UTC) #18
mmenke
This does not handle redirects. There is a way to watch for redirects on a ...
8 years, 7 months ago (2012-05-17 20:52:23 UTC) #19
cbentzel
Too tired to finish this review tonight, sorry. http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode30 chrome/browser/captive_portal/captive_portal_tab_helper.h:30: // ...
8 years, 7 months ago (2012-05-18 03:23:16 UTC) #20
mmenke
http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode30 chrome/browser/captive_portal/captive_portal_tab_helper.h:30: // Only supports SSL main frames which time out ...
8 years, 7 months ago (2012-05-18 06:12:52 UTC) #21
mmenke
http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_observer.h File chrome/browser/captive_portal/captive_portal_tab_observer.h (right): http://codereview.chromium.org/10020051/diff/65007/chrome/browser/captive_portal/captive_portal_tab_observer.h#newcode54 chrome/browser/captive_portal/captive_portal_tab_observer.h:54: virtual void DidStopLoading() OVERRIDE; On 2012/05/18 06:12:53, Matt Menke ...
8 years, 7 months ago (2012-05-18 08:08:09 UTC) #22
cbentzel
http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode38 chrome/browser/captive_portal/captive_portal_tab_helper.h:38: class CaptivePortalTabHelper : public content::NotificationObserver, Would it make sense ...
8 years, 7 months ago (2012-05-22 17:54:27 UTC) #23
mmenke
http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode38 chrome/browser/captive_portal/captive_portal_tab_helper.h:38: class CaptivePortalTabHelper : public content::NotificationObserver, On 2012/05/22 17:54:27, cbentzel ...
8 years, 7 months ago (2012-05-22 18:22:35 UTC) #24
cbentzel
http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode38 chrome/browser/captive_portal/captive_portal_tab_helper.h:38: class CaptivePortalTabHelper : public content::NotificationObserver, On 2012/05/22 18:22:36, Matt ...
8 years, 7 months ago (2012-05-24 12:41:37 UTC) #25
mmenke
http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/66013/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode38 chrome/browser/captive_portal/captive_portal_tab_helper.h:38: class CaptivePortalTabHelper : public content::NotificationObserver, On 2012/05/24 12:41:37, cbentzel ...
8 years, 7 months ago (2012-05-24 14:19:04 UTC) #26
mmenke
PTAL. Simplest to compare patch set 20 to the latest patch, to just view changes. ...
8 years, 6 months ago (2012-05-30 15:00:42 UTC) #27
cbentzel
I'll need to do a fine-grained pass, but this approach generally L G T M. ...
8 years, 6 months ago (2012-05-30 16:26:42 UTC) #28
mmenke
On 2012/05/30 16:26:42, cbentzel wrote: > I'll need to do a fine-grained pass, but this ...
8 years, 6 months ago (2012-05-30 17:46:24 UTC) #29
cbentzel
The only thing I am concerned about is whether we want to do the captive ...
8 years, 6 months ago (2012-05-30 18:48:02 UTC) #30
cbentzel
On 2012/05/30 18:48:02, cbentzel wrote: > The only thing I am concerned about is whether ...
8 years, 6 months ago (2012-05-31 17:29:00 UTC) #31
mmenke
http://codereview.chromium.org/10020051/diff/81008/chrome/browser/captive_portal/captive_portal_browsertest.cc File chrome/browser/captive_portal/captive_portal_browsertest.cc (right): http://codereview.chromium.org/10020051/diff/81008/chrome/browser/captive_portal/captive_portal_browsertest.cc#newcode80 chrome/browser/captive_portal/captive_portal_browsertest.cc:80: const char* const kMockHttpsUrl = "https://mock.captive.portal/"; On 2012/05/30 18:48:02, ...
8 years, 6 months ago (2012-05-31 20:31:45 UTC) #32
cbentzel
LGTM http://codereview.chromium.org/10020051/diff/79008/chrome/browser/captive_portal/captive_portal_browsertest.cc File chrome/browser/captive_portal/captive_portal_browsertest.cc (right): http://codereview.chromium.org/10020051/diff/79008/chrome/browser/captive_portal/captive_portal_browsertest.cc#newcode173 chrome/browser/captive_portal/captive_portal_browsertest.cc:173: URLRequestTimeoutOnDemandJob** job = &job_list_; Ah, you know the ...
8 years, 6 months ago (2012-05-31 20:50:43 UTC) #33
mmenke
Thanks for the comments. http://codereview.chromium.org/10020051/diff/79008/chrome/browser/captive_portal/captive_portal_browsertest.cc File chrome/browser/captive_portal/captive_portal_browsertest.cc (right): http://codereview.chromium.org/10020051/diff/79008/chrome/browser/captive_portal/captive_portal_browsertest.cc#newcode173 chrome/browser/captive_portal/captive_portal_browsertest.cc:173: URLRequestTimeoutOnDemandJob** job = &job_list_; On ...
8 years, 6 months ago (2012-05-31 21:12:57 UTC) #34
mmenke
[+avi] Could you please review this? Thanks! Might want to skip/skim the tests, as they're ...
8 years, 6 months ago (2012-06-06 17:21:15 UTC) #35
mmenke
[avi] Ping! Just want to make sure this is on your radar.
8 years, 6 months ago (2012-06-12 14:38:31 UTC) #36
Avi (use Gerrit)
lgtm http://codereview.chromium.org/10020051/diff/99002/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/99002/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode30 chrome/browser/captive_portal/captive_portal_tab_helper.h:30: // CaptivePortalTabReloader. It filters out non-main-frame resource loads, ...
8 years, 6 months ago (2012-06-14 15:24:28 UTC) #37
mmenke
http://codereview.chromium.org/10020051/diff/99002/chrome/browser/captive_portal/captive_portal_tab_helper.h File chrome/browser/captive_portal/captive_portal_tab_helper.h (right): http://codereview.chromium.org/10020051/diff/99002/chrome/browser/captive_portal/captive_portal_tab_helper.h#newcode30 chrome/browser/captive_portal/captive_portal_tab_helper.h:30: // CaptivePortalTabReloader. It filters out non-main-frame resource loads, and ...
8 years, 6 months ago (2012-06-14 15:37:25 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmenke@chromium.org/10020051/106004
8 years, 6 months ago (2012-06-14 17:41:41 UTC) #39
commit-bot: I haz the power
Presubmit check for 10020051-106004 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-06-14 17:41:50 UTC) #40
mmenke
[+erg]: Please review profiles, thanks.
8 years, 6 months ago (2012-06-14 17:47:52 UTC) #41
Elliot Glaysher
lgtm
8 years, 6 months ago (2012-06-14 17:49:19 UTC) #42
mmenke
Thanks
8 years, 6 months ago (2012-06-14 18:04:18 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmenke@chromium.org/10020051/106004
8 years, 6 months ago (2012-06-14 18:04:45 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmenke@chromium.org/10020051/106004
8 years, 6 months ago (2012-06-14 19:46:29 UTC) #45
commit-bot: I haz the power
8 years, 6 months ago (2012-06-14 21:28:48 UTC) #46
Change committed as 142242

Powered by Google App Engine
This is Rietveld 408576698