Implement extension:// protocol.

Review URL: http://codereview.chromium.org/15010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7462 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension.h b/chrome/browser/extensions/extension.h
index 691a0b7..ac6c671 100644
--- a/chrome/browser/extensions/extension.h
+++ b/chrome/browser/extensions/extension.h
@@ -16,6 +16,7 @@
 class Extension {
  public:
   Extension(){};
+  Extension(const FilePath& path) : path_(path) {};
 
   // The format for extension manifests that this code understands.
   static const int kExpectedFormatVersion = 1;
@@ -39,6 +40,9 @@
   static const char* kInvalidContentScriptsListError;
   static const char* kInvalidContentScriptError;
 
+  // The path to the folder the extension is stored in.
+  const FilePath& path() const { return path_; }
+
   // A human-readable ID for the extension. The convention is to use something
   // like 'com.example.myextension', but this is not currently enforced. An
   // extension's ID is used in things like directory structures and URLs, and
@@ -65,9 +69,19 @@
   void CopyToValue(DictionaryValue* value);
 
  private:
+  // The path to the directory the extension is stored in.
+  FilePath path_;
+
+  // The extension's ID.
   std::string id_;
+
+  // The extension's human-readable name.
   std::string name_;
+
+  // An optional description for the extension.
   std::string description_;
+
+  // Paths to the content scripts the extension contains.
   std::vector<std::string> content_scripts_;
 
   DISALLOW_COPY_AND_ASSIGN(Extension);