diff options
| author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-14 01:06:31 +0000 |
|---|---|---|
| committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-14 01:06:31 +0000 |
| commit | df3329492816f35746b0bff443bab94a98ff1dc2 (patch) | |
| tree | eca1f89b836f75f2e785e1aafd0ed3186ae47bcf /chrome/browser/chromeos/offline/offline_load_page.cc | |
| parent | 144a810c11b8b921279dc639c85241048c9804bf (diff) | |
| download | chromium_src-df3329492816f35746b0bff443bab94a98ff1dc2.zip chromium_src-df3329492816f35746b0bff443bab94a98ff1dc2.tar.gz chromium_src-df3329492816f35746b0bff443bab94a98ff1dc2.tar.bz2 | |
Make OfflineLoadPage not refer directly to OfflineResourceHandler.
Use base::Callback to enable more flexibility in how the consumer
of OfflineLoadPage manages memory.
Review URL: http://codereview.chromium.org/9211006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117745 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/offline/offline_load_page.cc')
| -rw-r--r-- | chrome/browser/chromeos/offline/offline_load_page.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc index 42c882a..61dce60 100644 --- a/chrome/browser/chromeos/offline/offline_load_page.cc +++ b/chrome/browser/chromeos/offline/offline_load_page.cc @@ -14,7 +14,6 @@ #include "chrome/browser/chromeos/cros/network_library.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/renderer_host/offline_resource_handler.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -49,9 +48,9 @@ namespace chromeos { OfflineLoadPage::OfflineLoadPage(WebContents* web_contents, const GURL& url, - OfflineResourceHandler* handler) + const CompletionCallback& callback) : ChromeInterstitialPage(web_contents, true, url), - handler_(handler), + callback_(callback), proceeded_(false) { net::NetworkChangeNotifier::AddOnlineStateObserver(this); } @@ -166,7 +165,8 @@ void OfflineLoadPage::CommandReceived(const std::string& cmd) { } void OfflineLoadPage::NotifyBlockingPageComplete(bool proceed) { - handler_->OnBlockingPageComplete(proceed); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, base::Bind(callback_, proceed)); } void OfflineLoadPage::Proceed() { |
