OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser_url_handler_impl.h" | 5 #include "content/browser/browser_url_handler_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "cc/base/switches.h" | 9 #include "cc/base/switches.h" |
10 #include "content/browser/frame_host/debug_urls.h" | 10 #include "content/browser/frame_host/debug_urls.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // chrome:// scheme, since the about: scheme won't be rewritten in | 80 // chrome:// scheme, since the about: scheme won't be rewritten in |
81 // this code path. | 81 // this code path. |
82 if (CommandLine::ForCurrentProcess()->HasSwitch( | 82 if (CommandLine::ForCurrentProcess()->HasSwitch( |
83 cc::switches::kEnableGpuBenchmarking)) { | 83 cc::switches::kEnableGpuBenchmarking)) { |
84 if (HandleDebugURL(*url, PAGE_TRANSITION_FROM_ADDRESS_BAR)) { | 84 if (HandleDebugURL(*url, PAGE_TRANSITION_FROM_ADDRESS_BAR)) { |
85 return true; | 85 return true; |
86 } | 86 } |
87 } | 87 } |
88 | 88 |
89 // Circumvent processing URLs that the renderer process will handle. | 89 // Circumvent processing URLs that the renderer process will handle. |
90 return *url == GURL(kChromeUICrashURL) || | 90 return IsRendererDebugURL(*url); |
91 *url == GURL(kChromeUIHangURL) || | |
92 *url == GURL(kChromeUIKillURL) || | |
93 *url == GURL(kChromeUIShorthangURL); | |
94 } | 91 } |
95 | 92 |
96 // static | 93 // static |
97 BrowserURLHandler* BrowserURLHandler::GetInstance() { | 94 BrowserURLHandler* BrowserURLHandler::GetInstance() { |
98 return BrowserURLHandlerImpl::GetInstance(); | 95 return BrowserURLHandlerImpl::GetInstance(); |
99 } | 96 } |
100 | 97 |
101 // static | 98 // static |
102 BrowserURLHandler::URLHandler BrowserURLHandler::null_handler() { | 99 BrowserURLHandler::URLHandler BrowserURLHandler::null_handler() { |
103 // Required for VS2010: http://connect.microsoft.com/VisualStudio/feedback/det
ails/520043/error-converting-from-null-to-a-pointer-type-in-std-pair | 100 // Required for VS2010: http://connect.microsoft.com/VisualStudio/feedback/det
ails/520043/error-converting-from-null-to-a-pointer-type-in-std-pair |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 return true; | 148 return true; |
152 } else if (handler(&test_url, browser_context)) { | 149 } else if (handler(&test_url, browser_context)) { |
153 return reverse_rewriter(url, browser_context); | 150 return reverse_rewriter(url, browser_context); |
154 } | 151 } |
155 } | 152 } |
156 } | 153 } |
157 return false; | 154 return false; |
158 } | 155 } |
159 | 156 |
160 } // namespace content | 157 } // namespace content |
OLD | NEW |