Chromium Code Reviews| 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 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 10 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 if (url == GURL(kChromeUIPpapiFlashCrashURL) || | 73 if (url == GURL(kChromeUIPpapiFlashCrashURL) || |
| 74 url == GURL(kChromeUIPpapiFlashHangURL)) { | 74 url == GURL(kChromeUIPpapiFlashHangURL)) { |
| 75 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 75 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 76 base::Bind(&HandlePpapiFlashDebugURL, url)); | 76 base::Bind(&HandlePpapiFlashDebugURL, url)); |
| 77 return true; | 77 return true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 return false; | 80 return false; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool IsDebugURL(const GURL& url) { | |
| 84 return IsRendererDebugURL(url) || | |
| 85 (url.is_valid() && | |
| 86 (url.host() == kChromeUIBrowserCrashHost || | |
|
Charlie Reis
2014/05/09 23:21:51
I worry about this getting stale when people add t
Ken Russell (switch to Gerrit)
2014/05/09 23:43:05
Added comments to both HandleDebugURL and IsDebugU
| |
| 87 url == GURL(kChromeUIGpuCleanURL) || | |
| 88 url == GURL(kChromeUIGpuCrashURL) || | |
| 89 url == GURL(kChromeUIGpuHangURL) || | |
| 90 url == GURL(kChromeUIPpapiFlashCrashURL) || | |
| 91 url == GURL(kChromeUIPpapiFlashHangURL))); | |
| 92 } | |
| 93 | |
| 83 bool IsRendererDebugURL(const GURL& url) { | 94 bool IsRendererDebugURL(const GURL& url) { |
| 84 if (!url.is_valid()) | 95 if (!url.is_valid()) |
| 85 return false; | 96 return false; |
| 86 | 97 |
| 87 if (url.SchemeIs(kJavaScriptScheme)) | 98 if (url.SchemeIs(kJavaScriptScheme)) |
| 88 return true; | 99 return true; |
| 89 | 100 |
| 90 return url == GURL(kChromeUICrashURL) || | 101 return url == GURL(kChromeUICrashURL) || |
| 91 url == GURL(kChromeUIKillURL) || | 102 url == GURL(kChromeUIKillURL) || |
| 92 url == GURL(kChromeUIHangURL) || | 103 url == GURL(kChromeUIHangURL) || |
| 93 url == GURL(kChromeUIShorthangURL); | 104 url == GURL(kChromeUIShorthangURL); |
| 94 } | 105 } |
| 95 | 106 |
| 96 } // namespace content | 107 } // namespace content |
| OLD | NEW |