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

Unified Diff: chrome/browser/extensions/sandboxed_unpacker.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: 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/browser/extensions/sandboxed_unpacker.cc
diff --git a/chrome/browser/extensions/sandboxed_unpacker.cc b/chrome/browser/extensions/sandboxed_unpacker.cc
index cb40debb2e3e8a340a7292c9cb1d1e3cedc5ce9e..c59af568fac69cc2fd89c545674e339936af8ae3 100644
--- a/chrome/browser/extensions/sandboxed_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_unpacker.cc
@@ -182,7 +182,7 @@ bool FindWritableTempLocation(const base::FilePath& extensions_dir,
bool ReadImagesFromFile(const base::FilePath& extension_path,
DecodedImages* images) {
base::FilePath path =
- extension_path.AppendASCII(extension_filenames::kDecodedImagesFilename);
+ extension_path.AppendASCII(filenames::kDecodedImagesFilename);
std::string file_str;
if (!file_util::ReadFileToString(path, &file_str))
return false;
@@ -198,7 +198,7 @@ bool ReadImagesFromFile(const base::FilePath& extension_path,
bool ReadMessageCatalogsFromFile(const base::FilePath& extension_path,
base::DictionaryValue* catalogs) {
base::FilePath path = extension_path.AppendASCII(
- extension_filenames::kDecodedMessageCatalogsFilename);
+ filenames::kDecodedMessageCatalogsFilename);
std::string file_str;
if (!file_util::ReadFileToString(path, &file_str))
return false;
@@ -264,8 +264,7 @@ void SandboxedUnpacker::Start() {
return; // ReportFailure() already called.
// Initialize the path that will eventually contain the unpacked extension.
- extension_root_ = temp_dir_.path().AppendASCII(
- extension_filenames::kTempExtensionName);
+ extension_root_ = temp_dir_.path().AppendASCII(filenames::kTempExtensionName);
PATH_LENGTH_HISTOGRAM("Extensions.SandboxUnpackUnpackedCrxPathLength",
extension_root_);
@@ -625,7 +624,7 @@ DictionaryValue* SandboxedUnpacker::RewriteManifestFile(
}
base::FilePath manifest_path =
- extension_root_.Append(kManifestFilename);
+ extension_root_.Append(filenames::kManifestFilename);
if (!file_util::WriteFile(manifest_path,
manifest_json.data(), manifest_json.size())) {
// Error saving manifest.json.
@@ -782,7 +781,7 @@ bool SandboxedUnpacker::RewriteCatalogFiles() {
// hack and remove the corresponding #include.
base::FilePath relative_path =
base::FilePath::FromWStringHack(UTF8ToWide(it.key()));
- relative_path = relative_path.Append(kMessagesFilename);
+ relative_path = relative_path.Append(filenames::kMessagesFilename);
if (relative_path.IsAbsolute() || relative_path.ReferencesParent()) {
// Invalid path for catalog.
ReportFailure(

Powered by Google App Engine
This is Rietveld 408576698