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

Unified Diff: content/browser/web_contents/navigation_controller_impl.cc

Issue 10780013: Add reverse URL handler for shortening uber URLs (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fixed frame navigation issues Created 8 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
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index dc49e94328368eecc10a1caa0d416835b118d46a..dc970f9a92f5278439277e6f7343f25c4ceb0e51 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -876,7 +876,12 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
// update the virtual URL based on the new URL. For example, this is needed
// to show chrome://bookmarks/#1 when the bookmarks webui extension changes
// the URL.
- update_virtual_url = true;
+ GURL temp = params.url;
Cem Kocagil 2012/07/25 23:02:34 The new navigation entries we created here default
+ bool reverse_on_redirect = false;
+ BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
+ &temp, browser_context_, &reverse_on_redirect);
+ update_virtual_url = reverse_on_redirect;
+ new_entry->set_update_virtual_url_with_url(reverse_on_redirect);
}
new_entry->SetURL(params.url);

Powered by Google App Engine
This is Rietveld 408576698