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

Unified Diff: chrome/common/extensions/extension.cc

Issue 159345: Implement mimetype sniffing for extensions. (Closed)
Patch Set: rebase Created 11 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
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index fc13d3aec2a538966728c92c9124f23405b20f9b..8097d5e50b6352a2e24ffcc040038e1404be444f 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -74,6 +74,8 @@ const char* Extension::kExtensionRegistryPath =
// first 16 bytes of SHA256 hashed public key.
const size_t Extension::kIdSize = 16;
+const char Extension::kMimeType[] = "application/x-chrome-extension";
+
const int Extension::kKnownIconSizes[] = { 128 };
Extension::~Extension() {
@@ -87,12 +89,12 @@ const std::string Extension::VersionString() const {
}
// static
-bool Extension::IsExtension(const FilePath& file_name) {
- return file_name.MatchesExtension(
- FilePath::StringType(FILE_PATH_LITERAL(".")) +
- chrome::kExtensionFileExtension);
-}
-
+bool Extension::IsExtension(const FilePath& file_name) {
+ return file_name.MatchesExtension(
+ FilePath::StringType(FILE_PATH_LITERAL(".")) +
+ chrome::kExtensionFileExtension);
+}
+
// static
bool Extension::IdIsValid(const std::string& id) {
// Verify that the id is legal.
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698