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

Unified Diff: webkit/glue/webframe_impl.cc

Issue 159575: Move alternate error page loading out of WebFrame.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframe_impl.cc
===================================================================
--- webkit/glue/webframe_impl.cc (revision 22154)
+++ webkit/glue/webframe_impl.cc (working copy)
@@ -152,7 +152,6 @@
#include "webkit/api/public/WebScriptSource.h"
#include "webkit/api/public/WebSize.h"
#include "webkit/api/public/WebURLError.h"
-#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/dom_operations.h"
#include "webkit/glue/dom_operations_private.h"
@@ -604,6 +603,12 @@
frame_->loader()->stopLoading(false);
}
+bool WebFrameImpl::IsLoading() const {
+ if (!frame_)
+ return false;
+ return frame_->loader()->isLoading();
+}
+
WebFrame* WebFrameImpl::GetOpener() const {
if (frame_) {
Frame* opener = frame_->loader()->opener();
@@ -1504,13 +1509,7 @@
}
}
-bool WebFrameImpl::IsLoading() {
- // I'm assuming this does what we want.
- return frame_->loader()->isLoading();
-}
-
void WebFrameImpl::Closing() {
- alt_error_page_fetcher_.reset();
frame_ = NULL;
}
@@ -1528,11 +1527,6 @@
// NOTE: mac only does this if there is a document
frame_->loader()->addData(data, length);
-
- // It's possible that we get a DNS failure followed by a second load that
- // succeeds before we hear back from the alternate error page server. In
- // that case, cancel the alt error page download.
- alt_error_page_fetcher_.reset();
}
void WebFrameImpl::DidFail(const ResourceError& error, bool was_provisional) {
@@ -1549,25 +1543,6 @@
}
}
-void WebFrameImpl::LoadAlternateHTMLErrorPage(const WebURLRequest& request,
- const WebURLError& error,
- const GURL& error_page_url,
- bool replace,
- const GURL& fake_url) {
- // Load alternate HTML in place of the previous request. We use a fake_url
- // for the Base URL. That prevents other web content from the same origin
- // as the failed URL to script the error page.
-
- LoadHTMLString("", // Empty document
- fake_url,
- error.unreachableURL,
- replace);
-
- alt_error_page_fetcher_.reset(new AltErrorPageResourceFetcher(
- error_page_url, this, error.unreachableURL,
- NewCallback(this, &WebFrameImpl::AltErrorPageFinished)));
-}
-
void WebFrameImpl::DispatchWillSendRequest(WebURLRequest* request) {
ResourceResponse response;
frame_->loader()->client()->dispatchWillSendRequest(NULL, 0,
@@ -1847,13 +1822,3 @@
frame_->loader()->end();
}
}
-
-void WebFrameImpl::AltErrorPageFinished(const GURL& unreachable_url,
- const std::string& html) {
- WebViewDelegate* d = GetWebViewImpl()->delegate();
- if (!d)
- return;
- WebURLError error;
- error.unreachableURL = unreachable_url;
- d->LoadNavigationErrorPage(this, WebURLRequest(), error, html, true);
-}
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | webkit/glue/webframeloaderclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698