Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: content/browser/browser_url_handler_impl.cc

Issue 160743002: Remove duplicated code in favor of IsRendererDebugURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/webui/web_ui_controller_factory_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/webui/web_ui_controller_factory_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698