Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / browser / browser_url_handler_impl.cc
index 7c212dc..e5d1026 100644 (file)
@@ -6,10 +6,10 @@
 
 #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"
 
@@ -24,9 +24,13 @@ static bool HandleViewSource(GURL* url, BrowserContext* browser_context) {
     // 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
@@ -76,17 +80,14 @@ static bool DebugURLHandler(GURL* url, BrowserContext* browser_context) {
   // 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