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

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: added tests 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;
+ bool reverse_on_redirect = false;
+ BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
Alexei Svitkine (slow) 2012/08/02 22:00:11 Can you add a comment explaining what this is doin
+ &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);
« chrome/browser/chrome_content_browser_client_unittest.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698