| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 PageTransition transition, | 642 PageTransition transition, |
| 643 const std::string& extra_headers) { | 643 const std::string& extra_headers) { |
| 644 LoadURLParams params(url); | 644 LoadURLParams params(url); |
| 645 params.referrer = referrer; | 645 params.referrer = referrer; |
| 646 params.transition_type = transition; | 646 params.transition_type = transition; |
| 647 params.extra_headers = extra_headers; | 647 params.extra_headers = extra_headers; |
| 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_EVENT0("browser", "NavigationControllerImpl::LoadURLWithParams"); | 652 TRACE_EVENT1("browser,navigation", |
| 653 "NavigationControllerImpl::LoadURLWithParams", |
| 654 "url", params.url.possibly_invalid_spec()); |
| 653 if (HandleDebugURL(params.url, params.transition_type)) { | 655 if (HandleDebugURL(params.url, params.transition_type)) { |
| 654 // 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 |
| 655 // unhandled, otherwise Telemetry can't tell if Navigation completed. | 657 // unhandled, otherwise Telemetry can't tell if Navigation completed. |
| 656 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 658 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 657 cc::switches::kEnableGpuBenchmarking)) | 659 cc::switches::kEnableGpuBenchmarking)) |
| 658 return; | 660 return; |
| 659 } | 661 } |
| 660 | 662 |
| 661 // 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 |
| 662 // 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 |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 } | 1788 } |
| 1787 } | 1789 } |
| 1788 } | 1790 } |
| 1789 | 1791 |
| 1790 void NavigationControllerImpl::SetGetTimestampCallbackForTest( | 1792 void NavigationControllerImpl::SetGetTimestampCallbackForTest( |
| 1791 const base::Callback<base::Time()>& get_timestamp_callback) { | 1793 const base::Callback<base::Time()>& get_timestamp_callback) { |
| 1792 get_timestamp_callback_ = get_timestamp_callback; | 1794 get_timestamp_callback_ = get_timestamp_callback; |
| 1793 } | 1795 } |
| 1794 | 1796 |
| 1795 } // namespace content | 1797 } // namespace content |
| OLD | NEW |