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

Unified Diff: extensions/common/constants.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: extensions/common/constants.cc
diff --git a/extensions/common/constants.cc b/extensions/common/constants.cc
index f84386a5899b55ac1368ef1f3271f6a9c80aaadb..3cdc24b0a7ba8fb78671ff8b4624281e421f5fb0 100644
--- a/extensions/common/constants.cc
+++ b/extensions/common/constants.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/files/file_path.h"
#include "extensions/common/constants.h"
namespace extensions {
const char kExtensionScheme[] = "chrome-extension";
+namespace filenames {
+
const base::FilePath::CharType kManifestFilename[] =
FILE_PATH_LITERAL("manifest.json");
const base::FilePath::CharType kLocaleFolder[] =
@@ -19,4 +22,22 @@ const base::FilePath::CharType kPlatformSpecificFolder[] =
const char kInstallDirectoryName[] = "Extensions";
-} // namespace extensions
+const char kTempExtensionName[] = "CRX_INSTALL";
+const char kDecodedImagesFilename[] = "DECODED_IMAGES";
+const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS";
+const char kGeneratedBackgroundPageFilename[] =
+ "_generated_background_page.html";
+const char kModulesDir[] = "_modules";
+
+const base::FilePath::CharType kExtensionFileExtension[] =
+ FILE_PATH_LITERAL(".crx");
+const base::FilePath::CharType kExtensionKeyFileExtension[] =
+ FILE_PATH_LITERAL(".pem");
+
+bool IsExtension(const base::FilePath& file_name) {
+ return file_name.MatchesExtension(kExtensionFileExtension);
+}
+
+} // namespace filenames
+
+} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698