summaryrefslogtreecommitdiffstats
path: root/chrome/common/url_constants.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 16:06:03 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-07 16:06:03 +0000
commit2a80aee736e7c21323d2d72aa6ff4255e5b0f72a (patch)
tree2f4683ccc5187c09e7ba5c287f329ab5e9136504 /chrome/common/url_constants.cc
parent677016d17792ba1299dd328289d627a806ce9613 (diff)
downloadchromium_src-2a80aee736e7c21323d2d72aa6ff4255e5b0f72a.zip
chromium_src-2a80aee736e7c21323d2d72aa6ff4255e5b0f72a.tar.gz
chromium_src-2a80aee736e7c21323d2d72aa6ff4255e5b0f72a.tar.bz2
Move kExtensionScheme from content to chrome
BUG=89642 TEST=everything still works Review URL: http://codereview.chromium.org/8159006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/url_constants.cc')
-rw-r--r--chrome/common/url_constants.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 15a8f83..ec6cb4c 100644
--- a/chrome/common/url_constants.cc
+++ b/chrome/common/url_constants.cc
@@ -6,6 +6,13 @@
#include "googleurl/src/url_util.h"
+namespace {
+const char* kSavableSchemes[] = {
+ chrome::kExtensionScheme,
+ NULL
+};
+} // namespace
+
namespace chrome {
#if defined(OS_CHROMEOS)
@@ -320,23 +327,16 @@ const char* const kChromeDebugURLs[] = {
};
int kNumberOfChromeDebugURLs = static_cast<int>(arraysize(kChromeDebugURLs));
+const char kExtensionScheme[] = "chrome-extension";
+
void RegisterChromeSchemes() {
- // Don't need "chrome-internal" which was used in old versions of Chrome for
- // the new tab page.
- url_util::AddStandardScheme(kChromeDevToolsScheme);
- url_util::AddStandardScheme(kChromeUIScheme);
url_util::AddStandardScheme(kExtensionScheme);
- url_util::AddStandardScheme(kMetadataScheme);
#if defined(OS_CHROMEOS)
url_util::AddStandardScheme(kCrosScheme);
#endif
- // Prevent future modification of the standard schemes list. This is to
- // prevent accidental creation of data races in the program. AddStandardScheme
- // isn't threadsafe so must be called when GURL isn't used on any other
- // thread. This is really easy to mess up, so we say that all calls to
- // AddStandardScheme in Chrome must be inside this function.
- url_util::LockStandardSchemes();
+ // This call will also lock the list of standard schemes.
+ RegisterContentSchemes(kSavableSchemes);
}
} // namespace chrome