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

Unified Diff: chrome/browser/extensions/user_script_master.cc

Issue 31008: Coalesce more hardcoded schemes to using predefined constants. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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/browser/extensions/extension_protocols.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/user_script_master.cc
===================================================================
--- chrome/browser/extensions/user_script_master.cc (revision 10345)
+++ chrome/browser/extensions/user_script_master.cc (working copy)
@@ -14,12 +14,9 @@
#include "base/string_util.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/stl_util-inl.h"
+#include "chrome/common/url_constants.h"
#include "net/base/net_util.h"
-// Defined in extension.h.
-extern const char kExtensionURLScheme[];
-extern const char kUserScriptURLScheme[];
-
// static
bool GetDeclarationValue(const StringPiece& line, const StringPiece& prefix,
std::string* value) {
@@ -158,7 +155,7 @@
file = enumerator.Next()) {
all_scripts.push_back(UserScript());
UserScript& info = all_scripts.back();
- info.set_url(GURL(std::string(kUserScriptURLScheme) + ":/" +
+ info.set_url(GURL(std::string(chrome::kUserScriptScheme) + ":/" +
net::FilePathToFileURL(file.ToWStringHack()).ExtractFileName()));
info.set_path(file);
}
« no previous file with comments | « chrome/browser/extensions/extension_protocols.cc ('k') | chrome/browser/history/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698