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

Unified Diff: chrome/browser/net/net_error_tab_helper.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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 | « chrome/browser/net/net_error_tab_helper.h ('k') | chrome/browser/net/net_error_tab_helper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/net_error_tab_helper.cc
diff --git a/chrome/browser/net/net_error_tab_helper.cc b/chrome/browser/net/net_error_tab_helper.cc
index 6957d023553b7c24d200c62a6906930a02709cf9..823d96fd9a59b8d287529321bd40321bb0be47ea 100644
--- a/chrome/browser/net/net_error_tab_helper.cc
+++ b/chrome/browser/net/net_error_tab_helper.cc
@@ -21,7 +21,6 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/render_process_host.h"
#include "content/public/common/associated_interface_provider.h"
#include "ipc/ipc_message_macros.h"
#include "net/base/net_errors.h"
@@ -210,27 +209,19 @@ void NetErrorTabHelper::OnDnsProbeFinished(DnsProbeStatus result) {
}
#if BUILDFLAG(ANDROID_JAVA_UI)
-void NetErrorTabHelper::DownloadPageLater(const GURL& page_url) {
+void NetErrorTabHelper::DownloadPageLater() {
// Makes sure that this is coming from an error page.
content::NavigationEntry* entry =
web_contents()->GetController().GetLastCommittedEntry();
if (!entry || entry->GetPageType() != content::PAGE_TYPE_ERROR)
return;
- GURL validated_page_url(page_url);
- web_contents()->GetRenderProcessHost()->FilterURL(false, &validated_page_url);
-
// Only download the page for HTTP/HTTPS URLs.
- if (!validated_page_url.is_valid() ||
- !validated_page_url.SchemeIsHTTPOrHTTPS()) {
- return;
- }
-
- // Makes sure that the passed URL matches with current URL.
- if (validated_page_url != web_contents()->GetLastCommittedURL())
+ GURL url(entry->GetVirtualURL());
+ if (!url.SchemeIsHTTPOrHTTPS())
return;
- DownloadPageLaterHelper(validated_page_url);
+ DownloadPageLaterHelper(url);
}
#endif // BUILDFLAG(ANDROID_JAVA_UI)
« no previous file with comments | « chrome/browser/net/net_error_tab_helper.h ('k') | chrome/browser/net/net_error_tab_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698