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

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

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/browser/download/save_package.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.h
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 32fc403cb7ed4fa44909f899f173982c0208040c..a47ab842ef6b500904e524de9dd9864c2fb24d22 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -64,13 +64,13 @@ class Extension {
// The number of bytes in a legal id.
static const size_t kIdSize;
+ // The mimetype used for extensions.
+ static const char kMimeType[];
+
Extension() : location_(INVALID), is_theme_(false) {}
explicit Extension(const FilePath& path);
virtual ~Extension();
- // Returns true if the specified file is an extension.
- static bool IsExtension(const FilePath& file_name);
-
// Resets the id counter. This is only useful for unit tests.
static void ResetGeneratedIdCounter() {
id_counter_ = 0;
@@ -79,6 +79,9 @@ class Extension {
// Checks to see if the extension has a valid ID.
static bool IdIsValid(const std::string& id);
+ // Returns true if the specified file is an extension.
+ static bool IsExtension(const FilePath& file_name);
+
// Whether the |location| is external or not.
static inline bool IsExternalLocation(Location location) {
return location == Extension::EXTERNAL_PREF ||
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698