| 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..0afcec5bade43f1a436ba9020e1d4b1085ac105b 100644
|
| --- a/content/browser/web_contents/navigation_controller_impl.cc
|
| +++ b/content/browser/web_contents/navigation_controller_impl.cc
|
| @@ -872,11 +872,23 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
| update_virtual_url = new_entry->update_virtual_url_with_url();
|
| } else {
|
| new_entry = new NavigationEntryImpl;
|
| +
|
| + // Find out whether the new entry needs to update its virtual URL on URL
|
| + // change and set up the entry accordingly. This is needed to correctly
|
| + // update the virtual URL when replaceState is called after a pushState.
|
| + // For example, this allows uber page to update the virtual URL by calling
|
| + // replaceState after the user navigates via the uber-frame.
|
| + GURL temp = params.url;
|
| + bool reverse_on_redirect = false;
|
| + BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
|
| + &temp, browser_context_, &reverse_on_redirect);
|
| + new_entry->set_update_virtual_url_with_url(reverse_on_redirect);
|
| +
|
| // When navigating to a new page, give the browser URL handler a chance to
|
| // 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;
|
| + update_virtual_url = reverse_on_redirect;
|
| }
|
|
|
| new_entry->SetURL(params.url);
|
|
|