| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/frame_host/navigation_controller_impl.h" | 5 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 LoadURLWithParams(params); | 648 LoadURLWithParams(params); |
| 649 } | 649 } |
| 650 | 650 |
| 651 void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) { | 651 void NavigationControllerImpl::LoadURLWithParams(const LoadURLParams& params) { |
| 652 TRACE_EVENT1("browser,navigation", | 652 TRACE_EVENT1("browser,navigation", |
| 653 "NavigationControllerImpl::LoadURLWithParams", | 653 "NavigationControllerImpl::LoadURLWithParams", |
| 654 "url", params.url.possibly_invalid_spec()); | 654 "url", params.url.possibly_invalid_spec()); |
| 655 if (HandleDebugURL(params.url, params.transition_type)) { | 655 if (HandleDebugURL(params.url, params.transition_type)) { |
| 656 // If Telemetry is running, allow the URL load to proceed as if it's | 656 // If Telemetry is running, allow the URL load to proceed as if it's |
| 657 // unhandled, otherwise Telemetry can't tell if Navigation completed. | 657 // unhandled, otherwise Telemetry can't tell if Navigation completed. |
| 658 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 658 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 659 cc::switches::kEnableGpuBenchmarking)) | 659 cc::switches::kEnableGpuBenchmarking)) |
| 660 return; | 660 return; |
| 661 } | 661 } |
| 662 | 662 |
| 663 // Any renderer-side debug URLs or javascript: URLs should be ignored if the | 663 // Any renderer-side debug URLs or javascript: URLs should be ignored if the |
| 664 // renderer process is not live, unless it is the initial navigation of the | 664 // renderer process is not live, unless it is the initial navigation of the |
| 665 // tab. | 665 // tab. |
| 666 if (IsRendererDebugURL(params.url)) { | 666 if (IsRendererDebugURL(params.url)) { |
| 667 // TODO(creis): Find the RVH for the correct frame. | 667 // TODO(creis): Find the RVH for the correct frame. |
| 668 if (!delegate_->GetRenderViewHost()->IsRenderViewLive() && | 668 if (!delegate_->GetRenderViewHost()->IsRenderViewLive() && |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1772 } | 1772 } |
| 1773 } | 1773 } |
| 1774 } | 1774 } |
| 1775 | 1775 |
| 1776 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1776 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 1777 const base::Callback<base::Time()>& get_timestamp_callback) { | 1777 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 1778 get_timestamp_callback_ = get_timestamp_callback; | 1778 get_timestamp_callback_ = get_timestamp_callback; |
| 1779 } | 1779 } |
| 1780 | 1780 |
| 1781 } // namespace content | 1781 } // namespace content |
| OLD | NEW |