summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 00:17:29 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 00:17:29 +0000
commit2d9748b216a7432d03425152e8889aa26c90b885 (patch)
tree1161f5c7264322f3325e064784e98eb8d2628328 /chrome/browser
parentb633c1d75b3539ab940eae2a65d2f574f7d5b88c (diff)
downloadchromium_src-2d9748b216a7432d03425152e8889aa26c90b885.zip
chromium_src-2d9748b216a7432d03425152e8889aa26c90b885.tar.gz
chromium_src-2d9748b216a7432d03425152e8889aa26c90b885.tar.bz2
Cleanup: Move kChromeUIScheme constant into content namespace.
BUG=None TEST=None, no functional changes TBR=jam@chromium.org Review URL: https://codereview.chromium.org/149643010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250244 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/builtin_provider.cc4
-rw-r--r--chrome/browser/autocomplete/builtin_provider_unittest.cc4
-rw-r--r--chrome/browser/browser_about_handler.cc2
-rw-r--r--chrome/browser/browser_about_handler_unittest.cc2
-rw-r--r--chrome/browser/browsing_data/browsing_data_helper_unittest.cc4
-rw-r--r--chrome/browser/chrome_content_browser_client.cc6
-rw-r--r--chrome/browser/content_settings/host_content_settings_map.cc4
-rw-r--r--chrome/browser/custom_home_pages_table_model.cc2
-rw-r--r--chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc2
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc2
-rw-r--r--chrome/browser/extensions/extension_view_host_factory.cc2
-rw-r--r--chrome/browser/extensions/extension_web_contents_observer.cc2
-rw-r--r--chrome/browser/extensions/extension_web_ui.cc14
-rw-r--r--chrome/browser/favicon/favicon_service.cc4
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc2
-rw-r--r--chrome/browser/first_run/first_run.cc2
-rw-r--r--chrome/browser/history/history_service.cc2
-rw-r--r--chrome/browser/history/in_memory_url_index.cc2
-rw-r--r--chrome/browser/printing/print_preview_dialog_controller.cc2
-rw-r--r--chrome/browser/profiles/profile_io_data.cc2
-rw-r--r--chrome/browser/search/search.cc2
-rw-r--r--chrome/browser/sessions/base_session_service.cc2
-rw-r--r--chrome/browser/sync/glue/session_model_associator.cc2
-rw-r--r--chrome/browser/sync/glue/synced_session.cc2
-rw-r--r--chrome/browser/sync/sessions2/sessions_util.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc4
-rw-r--r--chrome/browser/translate/translate_manager.cc2
-rw-r--r--chrome/browser/translate/translate_manager_unittest.cc2
-rw-r--r--chrome/browser/ui/browser.cc4
-rw-r--r--chrome/browser/ui/browser_command_controller.cc4
-rw-r--r--chrome/browser/ui/browser_navigator.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc2
-rw-r--r--chrome/browser/ui/tabs/tab_strip_model.cc2
-rw-r--r--chrome/browser/ui/toolbar/origin_chip.cc4
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model_impl.cc6
-rw-r--r--chrome/browser/ui/views/toolbar/origin_chip_view.cc2
-rw-r--r--chrome/browser/ui/website_settings/website_settings.cc2
-rw-r--r--chrome/browser/ui/website_settings/website_settings_utils.cc4
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc2
-rw-r--r--chrome/browser/ui/webui/theme_source.cc4
40 files changed, 63 insertions, 61 deletions
diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc
index 1aac79f..7e46851 100644
--- a/chrome/browser/autocomplete/builtin_provider.cc
+++ b/chrome/browser/autocomplete/builtin_provider.cc
@@ -65,7 +65,7 @@ void BuiltinProvider::Start(const AutocompleteInput& input,
const base::string16 kAbout = base::ASCIIToUTF16(chrome::kAboutScheme) +
base::ASCIIToUTF16(content::kStandardSchemeSeparator);
- const base::string16 kChrome = base::ASCIIToUTF16(chrome::kChromeUIScheme) +
+ const base::string16 kChrome = base::ASCIIToUTF16(content::kChromeUIScheme) +
base::ASCIIToUTF16(content::kStandardSchemeSeparator);
const int kUrl = ACMatchClassification::URL;
@@ -95,7 +95,7 @@ void BuiltinProvider::Start(const AutocompleteInput& input,
GURL url = URLFixerUpper::FixupURL(base::UTF16ToUTF8(text), std::string());
// BuiltinProvider doesn't know how to suggest valid ?query or #fragment
// extensions to chrome: URLs.
- if (url.SchemeIs(chrome::kChromeUIScheme) && url.has_host() &&
+ if (url.SchemeIs(content::kChromeUIScheme) && url.has_host() &&
!url.has_query() && !url.has_ref()) {
// Include the path for sub-pages (e.g. "chrome://settings/browser").
base::string16 host_and_path = base::UTF8ToUTF16(url.host() + url.path());
diff --git a/chrome/browser/autocomplete/builtin_provider_unittest.cc b/chrome/browser/autocomplete/builtin_provider_unittest.cc
index faec405..3f29947 100644
--- a/chrome/browser/autocomplete/builtin_provider_unittest.cc
+++ b/chrome/browser/autocomplete/builtin_provider_unittest.cc
@@ -75,7 +75,7 @@ void BuiltinProviderTest::RunTest(test_data<ResultType>* builtin_cases,
TEST_F(BuiltinProviderTest, TypingScheme) {
const base::string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
- const base::string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
+ const base::string16 kChrome = ASCIIToUTF16(content::kChromeUIScheme);
const base::string16 kSeparator1 = ASCIIToUTF16(":");
const base::string16 kSeparator2 = ASCIIToUTF16(":/");
const base::string16 kSeparator3 =
@@ -142,7 +142,7 @@ TEST_F(BuiltinProviderTest, NonChromeURLs) {
TEST_F(BuiltinProviderTest, ChromeURLs) {
const base::string16 kAbout = ASCIIToUTF16(chrome::kAboutScheme);
- const base::string16 kChrome = ASCIIToUTF16(chrome::kChromeUIScheme);
+ const base::string16 kChrome = ASCIIToUTF16(content::kChromeUIScheme);
const base::string16 kSeparator1 = ASCIIToUTF16(":");
const base::string16 kSeparator2 = ASCIIToUTF16(":/");
const base::string16 kSeparator3 =
diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc
index 28d1f18..15c499f 100644
--- a/chrome/browser/browser_about_handler.cc
+++ b/chrome/browser/browser_about_handler.cc
@@ -24,7 +24,7 @@ bool WillHandleBrowserAboutURL(GURL* url,
!url->SchemeIs(chrome::kAboutScheme));
// Only handle chrome://foo/, URLFixerUpper::FixupURL translates about:foo.
- if (!url->SchemeIs(chrome::kChromeUIScheme))
+ if (!url->SchemeIs(content::kChromeUIScheme))
return false;
std::string host(url->host());
diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc
index 2154157..d21948f 100644
--- a/chrome/browser/browser_about_handler_unittest.cc
+++ b/chrome/browser/browser_about_handler_unittest.cc
@@ -17,7 +17,7 @@ using content::BrowserThread;
typedef testing::Test BrowserAboutHandlerTest;
TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) {
- std::string chrome_prefix(chrome::kChromeUIScheme);
+ std::string chrome_prefix(content::kChromeUIScheme);
chrome_prefix.append(content::kStandardSchemeSeparator);
struct AboutURLTestData {
GURL test_url;
diff --git a/chrome/browser/browsing_data/browsing_data_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_helper_unittest.cc
index b74cceb..3f490db 100644
--- a/chrome/browser/browsing_data/browsing_data_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_helper_unittest.cc
@@ -72,7 +72,7 @@ TEST_F(BrowsingDataHelperTest, ChromeSchemesAreNotWebSafe) {
EXPECT_FALSE(IsWebScheme(extensions::kExtensionScheme));
EXPECT_FALSE(IsWebScheme(chrome::kAboutScheme));
EXPECT_FALSE(IsWebScheme(chrome::kChromeDevToolsScheme));
- EXPECT_FALSE(IsWebScheme(chrome::kChromeUIScheme));
+ EXPECT_FALSE(IsWebScheme(content::kChromeUIScheme));
EXPECT_FALSE(IsWebScheme(content::kJavaScriptScheme));
EXPECT_FALSE(IsWebScheme(content::kMailToScheme));
EXPECT_FALSE(IsWebScheme(content::kMetadataScheme));
@@ -96,7 +96,7 @@ TEST_F(BrowsingDataHelperTest, ChromeSchemesAreNotAllExtension) {
EXPECT_FALSE(IsExtensionScheme(chrome::kAboutScheme));
EXPECT_FALSE(IsExtensionScheme(chrome::kChromeDevToolsScheme));
- EXPECT_FALSE(IsExtensionScheme(chrome::kChromeUIScheme));
+ EXPECT_FALSE(IsExtensionScheme(content::kChromeUIScheme));
EXPECT_FALSE(IsExtensionScheme(content::kJavaScriptScheme));
EXPECT_FALSE(IsExtensionScheme(content::kMailToScheme));
EXPECT_FALSE(IsExtensionScheme(content::kMetadataScheme));
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index cf19a3a..bbb5a8b 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -374,7 +374,7 @@ bool HandleWebUI(GURL* url, content::BrowserContext* browser_context) {
// disabled for security reasons. New tab page explains the reasons, so
// we redirect user to new tab page.
if (chromeos::UserManager::Get()->IsLoggedInAsGuest()) {
- if (url->SchemeIs(chrome::kChromeUIScheme) &&
+ if (url->SchemeIs(content::kChromeUIScheme) &&
(url->DomainIs(chrome::kChromeUIBookmarksHost) ||
#if defined(ENABLE_ENHANCED_BOOKMARKS)
url->DomainIs(chrome::kChromeUIEnhancedBookmarksHost) ||
@@ -392,7 +392,7 @@ bool HandleWebUI(GURL* url, content::BrowserContext* browser_context) {
// Reverse URL handler for Web UI. Maps "chrome://chrome/foo/" to
// "chrome://foo/".
bool HandleWebUIReverse(GURL* url, content::BrowserContext* browser_context) {
- if (!url->is_valid() || !url->SchemeIs(chrome::kChromeUIScheme))
+ if (!url->is_valid() || !url->SchemeIs(content::kChromeUIScheme))
return false;
return RemoveUberHost(url);
@@ -2536,7 +2536,7 @@ void ChromeContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
additional_allowed_schemes);
additional_allowed_schemes->push_back(kChromeDevToolsScheme);
- additional_allowed_schemes->push_back(kChromeUIScheme);
+ additional_allowed_schemes->push_back(content::kChromeUIScheme);
additional_allowed_schemes->push_back(extensions::kExtensionScheme);
}
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index 7b5cd0e..5871189 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -546,7 +546,7 @@ bool HostContentSettingsMap::ShouldAllowAllContent(
content_type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX) {
return false;
}
- if (secondary_url.SchemeIs(chrome::kChromeUIScheme) &&
+ if (secondary_url.SchemeIs(content::kChromeUIScheme) &&
content_type == CONTENT_SETTINGS_TYPE_COOKIES &&
primary_url.SchemeIsSecure()) {
return true;
@@ -565,7 +565,7 @@ bool HostContentSettingsMap::ShouldAllowAllContent(
}
}
return primary_url.SchemeIs(chrome::kChromeDevToolsScheme) ||
- primary_url.SchemeIs(chrome::kChromeUIScheme);
+ primary_url.SchemeIs(content::kChromeUIScheme);
}
base::Value* HostContentSettingsMap::GetWebsiteSetting(
diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc
index f3ba68b..46e3b25 100644
--- a/chrome/browser/custom_home_pages_table_model.cc
+++ b/chrome/browser/custom_home_pages_table_model.cc
@@ -37,7 +37,7 @@ bool ShouldAddPage(const GURL& url) {
if (url.SchemeIs(chrome::kChromeDevToolsScheme))
return false;
- if (url.SchemeIs(chrome::kChromeUIScheme)) {
+ if (url.SchemeIs(content::kChromeUIScheme)) {
if (url.host() == chrome::kChromeUISettingsHost)
return false;
diff --git a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
index 86aa198..8356221 100644
--- a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
+++ b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc
@@ -14,7 +14,7 @@ namespace {
// URL schemes for which we'll send events.
const char* kValidSchemes[] = {
- chrome::kChromeUIScheme,
+ content::kChromeUIScheme,
content::kHttpScheme,
content::kHttpsScheme,
content::kFileScheme,
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index 3bea9c3..15fbeb5 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -280,7 +280,7 @@ bool ExtensionTabUtil::IsCrashURL(const GURL& url) {
// Check a fixed-up URL, to normalize the scheme and parse hosts correctly.
GURL fixed_url =
URLFixerUpper::FixupURL(url.possibly_invalid_spec(), std::string());
- return (fixed_url.SchemeIs(chrome::kChromeUIScheme) &&
+ return (fixed_url.SchemeIs(content::kChromeUIScheme) &&
(fixed_url.host() == content::kChromeUIBrowserCrashHost ||
fixed_url.host() == chrome::kChromeUICrashHost));
}
diff --git a/chrome/browser/extensions/extension_view_host_factory.cc b/chrome/browser/extensions/extension_view_host_factory.cc
index 417495d..2b92644 100644
--- a/chrome/browser/extensions/extension_view_host_factory.cc
+++ b/chrome/browser/extensions/extension_view_host_factory.cc
@@ -83,7 +83,7 @@ const Extension* GetExtensionForUrl(Profile* profile, const GURL& url) {
if (!service)
return NULL;
std::string extension_id = url.host();
- if (url.SchemeIs(chrome::kChromeUIScheme) &&
+ if (url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUIExtensionInfoHost)
extension_id = url.path().substr(1);
return service->extensions()->GetByID(extension_id);
diff --git a/chrome/browser/extensions/extension_web_contents_observer.cc b/chrome/browser/extensions/extension_web_contents_observer.cc
index aed0c23..608533a 100644
--- a/chrome/browser/extensions/extension_web_contents_observer.cc
+++ b/chrome/browser/extensions/extension_web_contents_observer.cc
@@ -56,7 +56,7 @@ void ExtensionWebContentsObserver::RenderViewCreated(
(type == Manifest::TYPE_PLATFORM_APP &&
extension->location() == Manifest::COMPONENT)) {
content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
- process->GetID(), chrome::kChromeUIScheme);
+ process->GetID(), content::kChromeUIScheme);
}
// Some extensions use file:// URLs.
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 384552a..982de26 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/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;
diff --git a/chrome/browser/favicon/favicon_service.cc b/chrome/browser/favicon/favicon_service.cc
index 9c45370..9afc75f 100644
--- a/chrome/browser/favicon/favicon_service.cc
+++ b/chrome/browser/favicon/favicon_service.cc
@@ -199,7 +199,7 @@ base::CancelableTaskTracker::TaskId FaviconService::GetLargestRawFaviconForURL(
FaviconResultsCallback favicon_results_callback =
Bind(&FaviconService::RunFaviconRawCallbackWithBitmapResults,
base::Unretained(this), callback, 0, ui::ScaleFactor());
- if (page_url.SchemeIs(chrome::kChromeUIScheme) ||
+ if (page_url.SchemeIs(content::kChromeUIScheme) ||
page_url.SchemeIs(extensions::kExtensionScheme)) {
std::vector<ui::ScaleFactor> scale_factor;
scale_factor.push_back(ui::SCALE_FACTOR_100P);
@@ -325,7 +325,7 @@ base::CancelableTaskTracker::TaskId FaviconService::GetFaviconForURLImpl(
const std::vector<ui::ScaleFactor>& desired_scale_factors,
const FaviconResultsCallback& callback,
base::CancelableTaskTracker* tracker) {
- if (params.page_url.SchemeIs(chrome::kChromeUIScheme) ||
+ if (params.page_url.SchemeIs(content::kChromeUIScheme) ||
params.page_url.SchemeIs(extensions::kExtensionScheme)) {
return GetFaviconForChromeURL(profile_, params.page_url,
desired_scale_factors, callback, tracker);
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 245265d..062ad87 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -88,7 +88,7 @@ bool FaviconTabHelper::ShouldDisplayFavicon() {
return true;
GURL url = web_contents()->GetURL();
- if (url.SchemeIs(chrome::kChromeUIScheme) &&
+ if (url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost) {
return false;
}
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc
index 054b8c8..d58742d 100644
--- a/chrome/browser/first_run/first_run.cc
+++ b/chrome/browser/first_run/first_run.cc
@@ -366,7 +366,7 @@ void FirstRunBubbleLauncher::Observe(
return;
}
- if (contents && contents->GetURL().SchemeIs(chrome::kChromeUIScheme)) {
+ if (contents && contents->GetURL().SchemeIs(content::kChromeUIScheme)) {
// Suppress the first run bubble if 'make chrome metro' flow is showing.
if (contents->GetURL().host() == chrome::kChromeUIMetroFlowHost)
return;
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 4799efa..f48ca5a 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -1010,7 +1010,7 @@ bool HistoryService::CanAddURL(const GURL& url) {
if (url.SchemeIs(content::kJavaScriptScheme) ||
url.SchemeIs(chrome::kChromeDevToolsScheme) ||
url.SchemeIs(chrome::kChromeNativeScheme) ||
- url.SchemeIs(chrome::kChromeUIScheme) ||
+ url.SchemeIs(content::kChromeUIScheme) ||
url.SchemeIs(chrome::kChromeSearchScheme) ||
url.SchemeIs(chrome::kDomDistillerScheme) ||
url.SchemeIs(content::kViewSourceScheme))
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index 4caaaf0..6a0299c 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -40,7 +40,7 @@ void InitializeSchemeWhitelist(std::set<std::string>* whitelist) {
if (!whitelist->empty())
return; // Nothing to do, already initialized.
whitelist->insert(std::string(chrome::kAboutScheme));
- whitelist->insert(std::string(chrome::kChromeUIScheme));
+ whitelist->insert(std::string(content::kChromeUIScheme));
whitelist->insert(std::string(content::kFileScheme));
whitelist->insert(std::string(content::kFtpScheme));
whitelist->insert(std::string(content::kHttpScheme));
diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc
index 1a54dc1..4fb29b6 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.cc
+++ b/chrome/browser/printing/print_preview_dialog_controller.cc
@@ -367,7 +367,7 @@ bool PrintPreviewDialogController::IsPrintPreviewDialog(WebContents* contents) {
// static
bool PrintPreviewDialogController::IsPrintPreviewURL(const GURL& url) {
- return (url.SchemeIs(chrome::kChromeUIScheme) &&
+ return (url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUIPrintHost);
}
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index f8a5dc8..d6350ec 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -612,7 +612,7 @@ bool ProfileIOData::IsHandledProtocol(const std::string& scheme) {
chrome::kDomDistillerScheme,
extensions::kExtensionScheme,
extensions::kExtensionResourceScheme,
- chrome::kChromeUIScheme,
+ content::kChromeUIScheme,
content::kDataScheme,
#if defined(OS_CHROMEOS)
chrome::kDriveScheme,
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index bb42ef0..3aa8c72 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -681,7 +681,7 @@ bool HandleNewTabURLRewrite(GURL* url,
if (!IsInstantExtendedAPIEnabled())
return false;
- if (!url->SchemeIs(chrome::kChromeUIScheme) ||
+ if (!url->SchemeIs(content::kChromeUIScheme) ||
url->host() != chrome::kChromeUINewTabHost)
return false;
diff --git a/chrome/browser/sessions/base_session_service.cc b/chrome/browser/sessions/base_session_service.cc
index a07fd98..a130c89 100644
--- a/chrome/browser/sessions/base_session_service.cc
+++ b/chrome/browser/sessions/base_session_service.cc
@@ -267,7 +267,7 @@ bool BaseSessionService::RestoreSetWindowAppNameCommand(
bool BaseSessionService::ShouldTrackEntry(const GURL& url) {
// Blacklist chrome://quit and chrome://restart to avoid quit or restart
// loops.
- return url.is_valid() && !(url.SchemeIs(chrome::kChromeUIScheme) &&
+ return url.is_valid() && !(url.SchemeIs(content::kChromeUIScheme) &&
(url.host() == chrome::kChromeUIQuitHost ||
url.host() == chrome::kChromeUIRestartHost));
}
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 323c144..42f04dc 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -1138,7 +1138,7 @@ bool SessionModelAssociator::TabHasValidEntry(
return false;
const GURL& virtual_url = entry->GetVirtualURL();
if (virtual_url.is_valid() &&
- !virtual_url.SchemeIs(chrome::kChromeUIScheme) &&
+ !virtual_url.SchemeIs(content::kChromeUIScheme) &&
!virtual_url.SchemeIs(chrome::kChromeNativeScheme) &&
!virtual_url.SchemeIsFile()) {
found_valid_url = true;
diff --git a/chrome/browser/sync/glue/synced_session.cc b/chrome/browser/sync/glue/synced_session.cc
index 07e769b..2f35ee3 100644
--- a/chrome/browser/sync/glue/synced_session.cc
+++ b/chrome/browser/sync/glue/synced_session.cc
@@ -64,7 +64,7 @@ bool ShouldSyncSessionTab(const SessionTab& tab) {
for (size_t i = 0; i < tab.navigations.size(); ++i) {
const GURL& virtual_url = tab.navigations.at(i).virtual_url();
if (virtual_url.is_valid() &&
- !virtual_url.SchemeIs(chrome::kChromeUIScheme) &&
+ !virtual_url.SchemeIs(content::kChromeUIScheme) &&
!virtual_url.SchemeIs(chrome::kChromeNativeScheme) &&
!virtual_url.SchemeIsFile()) {
found_valid_url = true;
diff --git a/chrome/browser/sync/sessions2/sessions_util.cc b/chrome/browser/sync/sessions2/sessions_util.cc
index 075cf5c..8f48bba 100644
--- a/chrome/browser/sync/sessions2/sessions_util.cc
+++ b/chrome/browser/sync/sessions2/sessions_util.cc
@@ -37,7 +37,7 @@ bool ShouldSyncTab(const SyncedTabDelegate& tab) {
return false;
const GURL& virtual_url = entry->GetVirtualURL();
if (virtual_url.is_valid() &&
- !virtual_url.SchemeIs(chrome::kChromeUIScheme) &&
+ !virtual_url.SchemeIs(content::kChromeUIScheme) &&
!virtual_url.SchemeIs(chrome::kChromeNativeScheme) &&
!virtual_url.SchemeIsFile()) {
found_valid_url = true;
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index f2db25e..c1486d6 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -391,7 +391,7 @@ bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) {
// static
bool RenderViewContextMenu::IsInternalResourcesURL(const GURL& url) {
- if (!url.SchemeIs(chrome::kChromeUIScheme))
+ if (!url.SchemeIs(content::kChromeUIScheme))
return false;
return url.host() == chrome::kChromeUISyncResourcesHost;
}
@@ -1289,7 +1289,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_CONTENT_CONTEXT_OPENIMAGENEWTAB:
case IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE:
return params_.src_url.is_valid() &&
- (params_.src_url.scheme() != chrome::kChromeUIScheme);
+ (params_.src_url.scheme() != content::kChromeUIScheme);
case IDC_CONTENT_CONTEXT_COPYIMAGE:
return params_.has_image_contents;
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index 1ffbc92..f177adb 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -97,7 +97,7 @@ bool TranslateManager::IsTranslatableURL(const GURL& url) {
// - an FTP page (as FTP pages tend to have long lists of filenames that may
// confuse the CLD)
return !url.is_empty() &&
- !url.SchemeIs(chrome::kChromeUIScheme) &&
+ !url.SchemeIs(content::kChromeUIScheme) &&
!url.SchemeIs(chrome::kChromeDevToolsScheme) &&
#if defined(OS_CHROMEOS)
!(url.SchemeIs(extensions::kExtensionScheme) &&
diff --git a/chrome/browser/translate/translate_manager_unittest.cc b/chrome/browser/translate/translate_manager_unittest.cc
index 0dbb9af..bb9690c 100644
--- a/chrome/browser/translate/translate_manager_unittest.cc
+++ b/chrome/browser/translate/translate_manager_unittest.cc
@@ -19,7 +19,7 @@ TEST_F(TranslateManagerTest, CheckTranslatableURL) {
GURL empty_url = GURL(std::string());
EXPECT_FALSE(TranslateManager::IsTranslatableURL(empty_url));
- std::string chrome = std::string(chrome::kChromeUIScheme) + "://flags";
+ std::string chrome = std::string(content::kChromeUIScheme) + "://flags";
GURL chrome_url = GURL(chrome);
EXPECT_FALSE(TranslateManager::IsTranslatableURL(chrome_url));
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 46a8e64..25f1d28 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1421,9 +1421,9 @@ bool Browser::ShouldFocusLocationBarByDefault(WebContents* source) {
if (entry) {
GURL url = entry->GetURL();
GURL virtual_url = entry->GetVirtualURL();
- if ((url.SchemeIs(chrome::kChromeUIScheme) &&
+ if ((url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost) ||
- (virtual_url.SchemeIs(chrome::kChromeUIScheme) &&
+ (virtual_url.SchemeIs(content::kChromeUIScheme) &&
virtual_url.host() == chrome::kChromeUINewTabHost)) {
return true;
}
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index a85a5bc..619b5cd 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -93,13 +93,13 @@ bool HasInternalURL(const NavigationEntry* entry) {
// Check the |virtual_url()| first. This catches regular chrome:// URLs
// including URLs that were rewritten (such as chrome://bookmarks).
- if (entry->GetVirtualURL().SchemeIs(chrome::kChromeUIScheme))
+ if (entry->GetVirtualURL().SchemeIs(content::kChromeUIScheme))
return true;
// If the |virtual_url()| isn't a chrome:// URL, check if it's actually
// view-source: of a chrome:// URL.
if (entry->GetVirtualURL().SchemeIs(content::kViewSourceScheme))
- return entry->GetURL().SchemeIs(chrome::kChromeUIScheme);
+ return entry->GetURL().SchemeIs(content::kChromeUIScheme);
return false;
}
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index bc447c2..855a25b 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -723,7 +723,7 @@ bool IsURLAllowedInIncognito(const GURL& url,
// Most URLs are allowed in incognito; the following are exceptions.
// chrome://extensions is on the list because it redirects to
// chrome://settings.
- if (url.scheme() == chrome::kChromeUIScheme &&
+ if (url.scheme() == content::kChromeUIScheme &&
(url.host() == chrome::kChromeUISettingsHost ||
url.host() == chrome::kChromeUISettingsFrameHost ||
url.host() == chrome::kChromeUIExtensionsHost ||
@@ -754,7 +754,7 @@ bool IsURLAllowedInIncognito(const GURL& url,
&rewritten_url, browser_context, &reverse_on_redirect);
// Some URLs are mapped to uber subpages. Do not allow them in incognito.
- return !(rewritten_url.scheme() == chrome::kChromeUIScheme &&
+ return !(rewritten_url.scheme() == content::kChromeUIScheme &&
rewritten_url.host() == chrome::kChromeUIUberHost);
}
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index 911523c..76624a9 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -653,7 +653,7 @@ void BrowserToolbarGtk::OnDragDataReceived(GtkWidget* widget,
if (!url.is_valid())
return;
- bool url_is_newtab = url.SchemeIs(chrome::kChromeUIScheme) &&
+ bool url_is_newtab = url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost;
home_page_is_new_tab_page_.SetValue(url_is_newtab);
if (!url_is_newtab)
diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc
index e2c5349..dfad932 100644
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
@@ -1177,7 +1177,7 @@ std::vector<int> TabStripModel::GetIndicesForCommand(int index) const {
bool TabStripModel::IsNewTabAtEndOfTabStrip(WebContents* contents) const {
const GURL& url = contents->GetURL();
- return url.SchemeIs(chrome::kChromeUIScheme) &&
+ return url.SchemeIs(content::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost &&
contents == GetWebContentsAtImpl(count() - 1) &&
contents->GetController().GetEntryCount() == 1;
diff --git a/chrome/browser/ui/toolbar/origin_chip.cc b/chrome/browser/ui/toolbar/origin_chip.cc
index f070b73..e9caa30 100644
--- a/chrome/browser/ui/toolbar/origin_chip.cc
+++ b/chrome/browser/ui/toolbar/origin_chip.cc
@@ -28,7 +28,7 @@ namespace {
// number for the title of the page. If we don't have a specialized title,
// returns -1.
int StringForChromeHost(const GURL& url) {
- DCHECK(url.is_empty() || url.SchemeIs(chrome::kChromeUIScheme));
+ DCHECK(url.is_empty() || url.SchemeIs(content::kChromeUIScheme));
if (url.is_empty())
return IDS_NEW_TAB_TITLE;
@@ -99,7 +99,7 @@ base::string16 OriginChip::LabelFromURLForProfile(const GURL& provided_url,
return base::UTF8ToUTF16(url.spec());
// Chrome built-in pages.
- if (url.is_empty() || url.SchemeIs(chrome::kChromeUIScheme)) {
+ if (url.is_empty() || url.SchemeIs(content::kChromeUIScheme)) {
int string_ref = StringForChromeHost(url);
return (string_ref == -1) ?
base::UTF8ToUTF16("Chrome") :
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 10dee3ef..f0de3dc 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -193,9 +193,9 @@ bool ToolbarModelImpl::ShouldDisplayURL() const {
GURL url = entry->GetURL();
GURL virtual_url = entry->GetVirtualURL();
- if (url.SchemeIs(chrome::kChromeUIScheme) ||
- virtual_url.SchemeIs(chrome::kChromeUIScheme)) {
- if (!url.SchemeIs(chrome::kChromeUIScheme))
+ if (url.SchemeIs(content::kChromeUIScheme) ||
+ virtual_url.SchemeIs(content::kChromeUIScheme)) {
+ if (!url.SchemeIs(content::kChromeUIScheme))
url = virtual_url;
return url.host() != chrome::kChromeUINewTabHost;
}
diff --git a/chrome/browser/ui/views/toolbar/origin_chip_view.cc b/chrome/browser/ui/views/toolbar/origin_chip_view.cc
index 9da7401..10c3691 100644
--- a/chrome/browser/ui/views/toolbar/origin_chip_view.cc
+++ b/chrome/browser/ui/views/toolbar/origin_chip_view.cc
@@ -227,7 +227,7 @@ void OriginChipView::Update(content::WebContents* web_contents) {
showing_16x16_icon_ = false;
if (url_displayed_.is_empty() ||
- url_displayed_.SchemeIs(chrome::kChromeUIScheme)) {
+ url_displayed_.SchemeIs(content::kChromeUIScheme)) {
icon = IDR_PRODUCT_LOGO_16;
showing_16x16_icon_ = true;
}
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index cfff979..d147bb6 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -295,7 +295,7 @@ void WebsiteSettings::OnUIClosing() {
void WebsiteSettings::Init(Profile* profile,
const GURL& url,
const content::SSLStatus& ssl) {
- if (url.SchemeIs(chrome::kChromeUIScheme)) {
+ if (url.SchemeIs(content::kChromeUIScheme)) {
site_identity_status_ = SITE_IDENTITY_STATUS_INTERNAL_PAGE;
site_identity_details_ =
l10n_util::GetStringUTF16(IDS_PAGE_INFO_INTERNAL_PAGE);
diff --git a/chrome/browser/ui/website_settings/website_settings_utils.cc b/chrome/browser/ui/website_settings/website_settings_utils.cc
index d663d37..2da2f77 100644
--- a/chrome/browser/ui/website_settings/website_settings_utils.cc
+++ b/chrome/browser/ui/website_settings/website_settings_utils.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/website_settings/website_settings_utils.h"
-#include "chrome/common/url_constants.h"
+#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
#include "url/gurl.h"
// Returns true if the passed |url| refers to an internal chrome page.
bool InternalChromePage(const GURL& url) {
- return url.SchemeIs(chrome::kChromeUIScheme) ||
+ return url.SchemeIs(content::kChromeUIScheme) ||
url.SchemeIs(extensions::kExtensionScheme);
}
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index 310d5c4..b1a19b9 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -225,7 +225,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
// This will get called a lot to check all URLs, so do a quick check of other
// schemes to filter out most URLs.
if (!url.SchemeIs(chrome::kChromeDevToolsScheme) &&
- !url.SchemeIs(chrome::kChromeUIScheme)) {
+ !url.SchemeIs(content::kChromeUIScheme)) {
return NULL;
}
diff --git a/chrome/browser/ui/webui/theme_source.cc b/chrome/browser/ui/webui/theme_source.cc
index 4489807..0f676c5 100644
--- a/chrome/browser/ui/webui/theme_source.cc
+++ b/chrome/browser/ui/webui/theme_source.cc
@@ -28,8 +28,8 @@ using content::BrowserThread;
namespace {
std::string GetThemePath() {
- return std::string(chrome::kChromeUIScheme) +
- "://" + std::string(chrome::kChromeUIThemePath) + "/";
+ return std::string(content::kChromeUIScheme) + "://" +
+ std::string(chrome::kChromeUIThemePath) + "/";
}
// use a resource map rather than hard-coded strings.