From 6692b0d7bca9e0e3327d371c312196f3af9ed7c6 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Thu, 15 Jul 2010 03:40:23 +0000 Subject: 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. Review URL: http://codereview.chromium.org/2931005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52433 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/chrome_tests.gypi | 1 + 1 file changed, 1 insertion(+) (limited to 'chrome/chrome_tests.gypi') diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index ea886ca..c36ad23 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -613,6 +613,7 @@ 'browser/chromeos/login/google_authenticator_unittest.cc', 'browser/chromeos/login/mock_auth_response_handler.cc', 'browser/chromeos/notifications/desktop_notifications_unittest.cc', + 'browser/chromeos/offline/offline_load_page_unittest.cc', 'browser/chromeos/options/language_config_model_unittest.cc', 'browser/chromeos/pipe_reader_unittest.cc', 'browser/chromeos/status/language_menu_button_unittest.cc', -- cgit v1.1