Implement mimetype sniffing for extensions.

abarth: can you review the changes to mime_sniffer.cc?
paul: everything else?

BUG=13296
TEST=Added unit tests
Review URL: http://codereview.chromium.org/159345

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21612 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 32fc403c..6600da0 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -64,13 +64,13 @@
   // 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 @@
   // 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 ||