#include "base/command_line.h"
#include "base/strings/string_util.h"
+#include "cc/base/switches.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/browser/webui/web_ui_impl.h"
#include "content/public/browser/content_browser_client.h"
-#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "url/gurl.h"
// Bug 26129: limit view-source to view the content and not any
// other kind of 'active' url scheme like 'javascript' or 'data'.
static const char* const default_allowed_sub_schemes[] = {
- kHttpScheme, kHttpsScheme, kFtpScheme,
- chrome::kChromeDevToolsScheme, chrome::kChromeUIScheme,
- kFileScheme, kFileSystemScheme
+ kHttpScheme,
+ kHttpsScheme,
+ kFtpScheme,
+ kChromeDevToolsScheme,
+ kChromeUIScheme,
+ kFileScheme,
+ kFileSystemScheme
};
// Merge all the schemes for which view-source is allowed by default, with
// chrome:// scheme, since the about: scheme won't be rewritten in
// this code path.
if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableGpuBenchmarking)) {
+ cc::switches::kEnableGpuBenchmarking)) {
if (HandleDebugURL(*url, PAGE_TRANSITION_FROM_ADDRESS_BAR)) {
return true;
}
}
// Circumvent processing URLs that the renderer process will handle.
- return *url == GURL(kChromeUICrashURL) ||
- *url == GURL(kChromeUIHangURL) ||
- *url == GURL(kChromeUIKillURL) ||
- *url == GURL(kChromeUIShorthangURL);
+ return IsRendererDebugURL(*url);
}
// static