| Index: content/browser/frame_host/navigation_controller_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
|
| index a25aeba2e7496d540593fba2622b239992547ad9..a60274171df63ac275af93636bdd64520bb301e9 100644
|
| --- a/content/browser/frame_host/navigation_controller_impl.cc
|
| +++ b/content/browser/frame_host/navigation_controller_impl.cc
|
| @@ -652,8 +652,13 @@ void NavigationControllerImpl::LoadURL(
|
|
|
| void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) {
|
| TRACE_EVENT0("browser", "NavigationControllerImpl::LoadURLWithParams");
|
| - if (HandleDebugURL(params.url, params.transition_type))
|
| - return;
|
| + if (HandleDebugURL(params.url, params.transition_type)) {
|
| + // If Telemetry is running, allow the URL load to proceed as if it's
|
| + // unhandled, otherwise Telemetry can't tell if Navigation completed.
|
| + if (!CommandLine::ForCurrentProcess()->HasSwitch(
|
| + cc::switches::kEnableGpuBenchmarking))
|
| + return;
|
| + }
|
|
|
| // Any renderer-side debug URLs or javascript: URLs should be ignored if the
|
| // renderer process is not live, unless it is the initial navigation of the
|
| @@ -1035,18 +1040,8 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
| // update the virtual URL when replaceState is called after a pushState.
|
| GURL url = params.url;
|
| bool needs_update = false;
|
| - // We call RewriteURLIfNecessary twice: once when page navigation
|
| - // begins in CreateNavigationEntry, and once here when it commits.
|
| - // With the kEnableGpuBenchmarking flag, the rewriting includes
|
| - // handling debug URLs which cause an action to occur, and thus we
|
| - // should not rewrite them a second time.
|
| - bool skip_rewrite =
|
| - IsDebugURL(url) && base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| - cc::switches::kEnableGpuBenchmarking);
|
| - if (!skip_rewrite) {
|
| - BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
|
| - &url, browser_context_, &needs_update);
|
| - }
|
| + BrowserURLHandlerImpl::GetInstance()->RewriteURLIfNecessary(
|
| + &url, browser_context_, &needs_update);
|
| new_entry->set_update_virtual_url_with_url(needs_update);
|
|
|
| // When navigating to a new page, give the browser URL handler a chance to
|
|
|