Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8323)

Unified Diff: chrome/common/url_constants.cc

Issue 8159006: Move kExtensionScheme from content to chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/url_constants.h ('k') | chrome/renderer/extensions/chrome_v8_context_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/url_constants.cc
diff --git a/chrome/common/url_constants.cc b/chrome/common/url_constants.cc
index 15a8f836b8cd62bc3d1ff1a2fac60c5674392188..ec6cb4ca75e259ed09890b7fb621c40f91ac6627 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
« no previous file with comments | « chrome/common/url_constants.h ('k') | chrome/renderer/extensions/chrome_v8_context_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698