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

Unified Diff: chrome/common/extensions/manifest_handlers/shared_module_info.cc

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: todo Created 7 years, 5 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
Index: chrome/common/extensions/manifest_handlers/shared_module_info.cc
diff --git a/chrome/common/extensions/manifest_handlers/shared_module_info.cc b/chrome/common/extensions/manifest_handlers/shared_module_info.cc
index f1f965a8700ef3f2b849e83251458f95552284a8..dd906b4ee9db756a0a534f7edd4be72ec5622983 100644
--- a/chrome/common/extensions/manifest_handlers/shared_module_info.cc
+++ b/chrome/common/extensions/manifest_handlers/shared_module_info.cc
@@ -10,9 +10,9 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/version.h"
-#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/permissions/permission_set.h"
+#include "extensions/common/constants.h"
#include "extensions/common/error_utils.h"
namespace keys = extension_manifest_keys;
@@ -50,7 +50,7 @@ void SharedModuleInfo::ParseImportedPath(const std::string& path,
std::string* import_relative_path) {
std::vector<std::string> tokens;
Tokenize(path, std::string("/"), &tokens);
- if (tokens.size() > 2 && tokens[0] == extension_filenames::kModulesDir &&
+ if (tokens.size() > 2 && tokens[0] == kModulesDir &&
Extension::IdIsValid(tokens[1])) {
*import_id = tokens[1];
*import_relative_path = tokens[2];
@@ -63,7 +63,7 @@ void SharedModuleInfo::ParseImportedPath(const std::string& path,
bool SharedModuleInfo::IsImportedPath(const std::string& path) {
std::vector<std::string> tokens;
Tokenize(path, std::string("/"), &tokens);
- if (tokens.size() > 2 && tokens[0] == extension_filenames::kModulesDir &&
+ if (tokens.size() > 2 && tokens[0] == kModulesDir &&
Extension::IdIsValid(tokens[1])) {
return true;
}
@@ -224,5 +224,4 @@ const std::vector<std::string> SharedModuleHandler::Keys() const {
return std::vector<std::string>(keys, keys + arraysize(keys));
}
-} // extensions
-
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698