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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10704048: [RDS] Reloads a page using the original request URL (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase fix Created 8 years, 4 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 | « content/public/browser/navigation_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 4d136cc14d7f2612466e695c2e10854597030217..cfb3ada08d825a33fa95df0bcf754b4979ad2be5 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -361,7 +361,9 @@ static void StopAltErrorPageFetcher(WebDataSource* data_source) {
static bool IsReload(const ViewMsg_Navigate_Params& params) {
return
params.navigation_type == ViewMsg_Navigate_Type::RELOAD ||
- params.navigation_type == ViewMsg_Navigate_Type::RELOAD_IGNORING_CACHE;
+ params.navigation_type == ViewMsg_Navigate_Type::RELOAD_IGNORING_CACHE ||
+ params.navigation_type ==
+ ViewMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL;
}
static WebReferrerPolicy GetReferrerPolicyFromRequest(
@@ -1040,9 +1042,16 @@ void RenderViewImpl::OnNavigate(const ViewMsg_Navigate_Params& params) {
// have history state, then we need to navigate to it, which corresponds to a
// back/forward navigation event.
if (is_reload) {
+ bool reload_original_url =
+ (params.navigation_type ==
+ ViewMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL);
bool ignore_cache = (params.navigation_type ==
ViewMsg_Navigate_Type::RELOAD_IGNORING_CACHE);
- main_frame->reload(ignore_cache);
+
+ if (reload_original_url)
+ main_frame->reloadWithOverrideURL(params.url, true);
+ else
+ main_frame->reload(ignore_cache);
} else if (!params.state.empty()) {
// We must know the page ID of the page we are navigating back to.
DCHECK_NE(params.page_id, -1);
@@ -1478,6 +1487,9 @@ void RenderViewImpl::UpdateURL(WebFrame* frame) {
params.is_overriding_user_agent =
document_state->is_overriding_user_agent();
+ // Track the URL of the original request.
+ params.original_request_url = original_request.url();
+
// Save some histogram data so we can compute the average memory used per
// page load of the glyphs.
UMA_HISTOGRAM_COUNTS_10000("Memory.GlyphPagesPerLoad",
« no previous file with comments | « content/public/browser/navigation_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698