| 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/debug_urls.h" | 5 #include "content/browser/frame_host/debug_urls.h" |
| 6 | 6 |
| 7 #if defined(SYZYASAN) | 7 #if defined(SYZYASAN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } else { | 164 } else { |
| 165 return false; | 165 return false; |
| 166 } | 166 } |
| 167 #endif | 167 #endif |
| 168 | 168 |
| 169 return true; | 169 return true; |
| 170 } | 170 } |
| 171 | 171 |
| 172 void HangCurrentThread() { | 172 void HangCurrentThread() { |
| 173 ScopedAllowWaitForDebugURL allow_wait; | 173 ScopedAllowWaitForDebugURL allow_wait; |
| 174 base::WaitableEvent(false, false).Wait(); | 174 base::WaitableEvent(base::WaitableEvent::ResetPolicy::AUTOMATIC, |
| 175 base::WaitableEvent::InitialState::NOT_SIGNALED) |
| 176 .Wait(); |
| 175 } | 177 } |
| 176 | 178 |
| 177 } // namespace | 179 } // namespace |
| 178 | 180 |
| 179 bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { | 181 bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { |
| 180 // Ensure that the user explicitly navigated to this URL, unless | 182 // Ensure that the user explicitly navigated to this URL, unless |
| 181 // kEnableGpuBenchmarking is enabled by Telemetry. | 183 // kEnableGpuBenchmarking is enabled by Telemetry. |
| 182 bool is_telemetry_navigation = | 184 bool is_telemetry_navigation = |
| 183 base::CommandLine::ForCurrentProcess()->HasSwitch( | 185 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 184 cc::switches::kEnableGpuBenchmarking) && | 186 cc::switches::kEnableGpuBenchmarking) && |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 258 |
| 257 return url == GURL(kChromeUIBadCastCrashURL) || | 259 return url == GURL(kChromeUIBadCastCrashURL) || |
| 258 url == GURL(kChromeUICrashURL) || | 260 url == GURL(kChromeUICrashURL) || |
| 259 url == GURL(kChromeUIDumpURL) || | 261 url == GURL(kChromeUIDumpURL) || |
| 260 url == GURL(kChromeUIKillURL) || | 262 url == GURL(kChromeUIKillURL) || |
| 261 url == GURL(kChromeUIHangURL) || | 263 url == GURL(kChromeUIHangURL) || |
| 262 url == GURL(kChromeUIShorthangURL); | 264 url == GURL(kChromeUIShorthangURL); |
| 263 } | 265 } |
| 264 | 266 |
| 265 } // namespace content | 267 } // namespace content |
| OLD | NEW |