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

Issue 2931005: Show offline interstitial page when offline and reload when reconnected to network. (Closed)

Created:
10 years, 5 months ago by oshima
Modified:
9 years, 6 months ago
Reviewers:
DaveMoore
CC:
chromium-reviews, ben+cc_chromium.org, Paweł Hajdan Jr., arv (Not doing code reviews), darin-cc_chromium.org, brettw-cc_chromium.org, davemoore+watch_chromium.org, Paul Godavari
Visibility:
Public.

Description

Show offline interstitial page when offline and reload when reconnected to network. * Added OfflineResourceHandler that intercept the request and show interstitial page. * Added OfflineLoadPage that is shown when offline. This gets deleted when - User pressed "Load now" btton to proceed or - User pressed "Cancel" button to cancel loading - Network become available. The page first appears as blank page (a little darker than white for now. I'll update when mock is ready), and then options become available after 3 seconds maximum. * Added unit test for OfflineLoadPage class. * OfflineLoadService class to control when/if a load request should proceed regardless of network status. The current implementation is tentative and will proceed if if loading was requested in a given tab. I'll revisit this class to improve the logic in separate CL later. Known Issue: - thumbnail is not working yet. I'll working on this in separate Cl. - a tab shows URL instead of title string. I'll fix this in separate CL. - InitNavigationParams in offline_load_page_unittest is copied from safe_browsing_blocking_page_unittest. I'll move this to common place in separate CL. (hopefully before checking this in) BUG=chromium-os:3605 TEST=unit test: offline_load_page_unittest manual: disable wifi and ethernet, then login. chrome will show the offline page when tab is activated. Enable network (wifi or ethernet) and all tab will start loading again. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52433

Patch Set 1 #

Patch Set 2 : " #

Patch Set 3 : " #

Total comments: 13

Patch Set 4 : " #

Patch Set 5 : " #

Patch Set 6 : " #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1008 lines, -22 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/network_state_notifier.h View 1 3 3 chunks +14 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/network_state_notifier.cc View 1 3 2 chunks +25 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/network_state_notifier_browsertest.cc View 1 3 4 chunks +2 lines, -3 lines 0 comments Download
A chrome/browser/chromeos/offline/offline_load_page.h View 1 3 4 5 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/offline/offline_load_page.cc View 1 4 1 chunk +137 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/offline/offline_load_page_unittest.cc View 3 4 1 chunk +139 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/offline/offline_load_service.h View 1 3 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/offline/offline_load_service.cc View 1 1 chunk +104 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/offline_resource_handler.h View 1 2 3 1 chunk +74 lines, -0 lines 0 comments Download
A chrome/browser/renderer_host/offline_resource_handler.cc View 1 2 3 1 chunk +161 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_queue.cc View 1 chunk +3 lines, -1 line 0 comments Download
A chrome/browser/resources/offline_load.html View 1 2 1 chunk +107 lines, -0 lines 0 comments Download
M chrome/browser/sessions/session_restore.cc View 1 3 chunks +61 lines, -8 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
oshima
Sorry for big CL. I tried to make this small but wasn't successful.
10 years, 5 months ago (2010-07-12 23:40:13 UTC) #1
DaveMoore
http://codereview.chromium.org/2931005/diff/11001/3013 File chrome/browser/chromeos/network_state_notifier.cc (right): http://codereview.chromium.org/2931005/diff/11001/3013#newcode28 chrome/browser/chromeos/network_state_notifier.cc:28: } You might want to make this an instance ...
10 years, 5 months ago (2010-07-13 16:36:46 UTC) #2
oshima
http://codereview.chromium.org/2931005/diff/11001/3013 File chrome/browser/chromeos/network_state_notifier.cc (right): http://codereview.chromium.org/2931005/diff/11001/3013#newcode28 chrome/browser/chromeos/network_state_notifier.cc:28: } On 2010/07/13 16:36:46, davemoore wrote: > You might ...
10 years, 5 months ago (2010-07-14 20:39:31 UTC) #3
DaveMoore
My prior comment about > 1 being > 2 was wrong....> 1 is the right ...
10 years, 5 months ago (2010-07-14 20:48:27 UTC) #4
oshima
10 years, 5 months ago (2010-07-14 21:06:44 UTC) #5
On 2010/07/14 20:48:27, davemoore wrote:
> My prior comment about > 1 being > 2 was wrong....> 1 is the right thing here.
> 
> Other than that, LGTM

Doh, may be i need some break. thanks.

Powered by Google App Engine
This is Rietveld 408576698