X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fextensions%2Fextension_web_ui.cc;h=982de267700d9dca030ff57d07288f7ec7339cb7;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=384552a16d1d5d1bdaaa2283e53b0ff318074424;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/extensions/extension_web_ui.cc b/src/chrome/browser/extensions/extension_web_ui.cc index 384552a..982de26 100644 --- a/src/chrome/browser/extensions/extension_web_ui.cc +++ b/src/chrome/browser/extensions/extension_web_ui.cc @@ -66,13 +66,14 @@ void CleanUpDuplicates(base::ListValue* list) { // Reloads the page in |web_contents| if it uses the same profile as |profile| // and if the current URL is a chrome URL. -void UnregisterAndReplaceOverrideForWebContents( - const std::string& page, Profile* profile, WebContents* web_contents) { +void UnregisterAndReplaceOverrideForWebContents(const std::string& page, + Profile* profile, + WebContents* web_contents) { if (Profile::FromBrowserContext(web_contents->GetBrowserContext()) != profile) return; GURL url = web_contents->GetURL(); - if (!url.SchemeIs(chrome::kChromeUIScheme) || url.host() != page) + if (!url.SchemeIs(content::kChromeUIScheme) || url.host() != page) return; // Don't use Reload() since |url| isn't the same as the internal URL that @@ -169,8 +170,9 @@ void ExtensionWebUI::RegisterProfilePrefs( // static bool ExtensionWebUI::HandleChromeURLOverride( - GURL* url, content::BrowserContext* browser_context) { - if (!url->SchemeIs(chrome::kChromeUIScheme)) + GURL* url, + content::BrowserContext* browser_context) { + if (!url->SchemeIs(content::kChromeUIScheme)) return false; Profile* profile = Profile::FromBrowserContext(browser_context); @@ -261,7 +263,7 @@ bool ExtensionWebUI::HandleChromeURLOverrideReverse( if (!(*it2)->GetAsString(&override)) continue; if (StartsWithASCII(url->spec(), override, true)) { - GURL original_url(chrome::kChromeUIScheme + std::string("://") + + GURL original_url(content::kChromeUIScheme + std::string("://") + it.key() + url->spec().substr(override.length())); *url = original_url; return true;