Index: content/browser/frame_host/debug_urls.cc |
diff --git a/content/browser/frame_host/debug_urls.cc b/content/browser/frame_host/debug_urls.cc |
index ae454ae64a73f25687a0f72cdae5804771ea7e11..14ce8ceb648c06205cdc7d90b12198717d89b676 100644 |
--- a/content/browser/frame_host/debug_urls.cc |
+++ b/content/browser/frame_host/debug_urls.cc |
@@ -6,9 +6,11 @@ |
#include <vector> |
+#include "base/command_line.h" |
#include "base/debug/asan_invalid_access.h" |
#include "base/debug/profiler.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "cc/base/switches.h" |
#include "content/browser/gpu/gpu_process_host_ui_shim.h" |
#include "content/browser/ppapi_plugin_process_host.h" |
#include "content/public/browser/browser_thread.h" |
@@ -106,8 +108,14 @@ bool HandleAsanDebugURL(const GURL& url) { |
} // namespace |
bool HandleDebugURL(const GURL& url, PageTransition transition) { |
- // Ensure that the user explicitly navigated to this URL. |
- if (!(transition & PAGE_TRANSITION_FROM_ADDRESS_BAR)) |
+ // Ensure that the user explicitly navigated to this URL, unless |
+ // kEnableGpuBenchmarking is enabled by Telemetry. |
+ bool is_telemetry_navigation = CommandLine::ForCurrentProcess()->HasSwitch( |
+ cc::switches::kEnableGpuBenchmarking) && |
+ (transition & PAGE_TRANSITION_TYPED); |
+ |
+ if (!(transition & PAGE_TRANSITION_FROM_ADDRESS_BAR) && |
+ !is_telemetry_navigation) |
return false; |
// NOTE: when you add handling of any URLs to this function, also |