X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fbrowser%2Fbrowser_url_handler_impl.cc;h=e5d1026e92d84061def886059e71e231dae637e0;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=7c212dc3fd6c80e07b66422aba47278c30fc73a6;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/browser/browser_url_handler_impl.cc b/src/content/browser/browser_url_handler_impl.cc index 7c212dc..e5d1026 100644 --- a/src/content/browser/browser_url_handler_impl.cc +++ b/src/content/browser/browser_url_handler_impl.cc @@ -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