Introduce ExtensionsService. Load extensions on startup from a directory in
the profile if a command-line flag is present.

Please carefully scrutinize the threading/ref-counting schenanigans.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6403 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension.h b/chrome/browser/extensions/extension.h
index 16260e00..94127ac 100644
--- a/chrome/browser/extensions/extension.h
+++ b/chrome/browser/extensions/extension.h
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_H__
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_H__
+#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_H_
+#define CHROME_BROWSER_EXTENSIONS_EXTENSION_H_
 
 #include <string>
 #include <vector>
 
+#include "base/file_path.h"
 #include "base/string16.h"
 #include "base/values.h"
 
@@ -19,20 +20,24 @@
   // The format for extension manifests that this code understands.
   static const int kExpectedFormatVersion = 1;
 
+  // The name of the manifest inside an extension.
+  static const FilePath::CharType* kManifestFilename;
+
   // Keys used in JSON representation of extensions.
-  static const std::wstring kFormatVersionKey;
-  static const std::wstring kIdKey;
-  static const std::wstring kNameKey;
-  static const std::wstring kDescriptionKey;
-  static const std::wstring kContentScriptsKey;
+  static const wchar_t* kFormatVersionKey;
+  static const wchar_t* kIdKey;
+  static const wchar_t* kNameKey;
+  static const wchar_t* kDescriptionKey;
+  static const wchar_t* kContentScriptsKey;
 
   // Error messages returned from InitFromValue().
-  static const std::wstring kInvalidFormatVersionError;
-  static const std::wstring kInvalidIdError;
-  static const std::wstring kInvalidNameError;
-  static const std::wstring kInvalidDescriptionError;
-  static const std::wstring kInvalidContentScriptsListError;
-  static const std::wstring kInvalidContentScriptError;
+  static const wchar_t* kInvalidFormatVersionError;
+  static const wchar_t* kInvalidManifestError;
+  static const wchar_t* kInvalidIdError;
+  static const wchar_t* kInvalidNameError;
+  static const wchar_t* kInvalidDescriptionError;
+  static const wchar_t* kInvalidContentScriptsListError;
+  static const wchar_t* kInvalidContentScriptError;
 
   // A human-readable ID for the extension. The convention is to use something
   // like 'com.example.myextension', but this is not currently enforced. An
@@ -68,4 +73,4 @@
   DISALLOW_COPY_AND_ASSIGN(Extension);
 };
 
-#endif  // CHROME_BROWSER_EXTENSIONS_EXTENSION_H__
+#endif  // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_