diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 00:38:25 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 00:38:25 +0000 |
commit | 6014d67a9c2006e15cfa09babfe5eaf63d57a331 (patch) | |
tree | 9c0d36df02bd5b4a0e7fca1fa23045e3e6f26f27 /chrome/browser/extensions/extension.h | |
parent | fad84eab5e64996804824f2c7b8fce98da13b2cd (diff) | |
download | chromium_src-6014d67a9c2006e15cfa09babfe5eaf63d57a331.zip chromium_src-6014d67a9c2006e15cfa09babfe5eaf63d57a331.tar.gz chromium_src-6014d67a9c2006e15cfa09babfe5eaf63d57a331.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/extensions/extension.h')
-rw-r--r-- | chrome/browser/extensions/extension.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/extensions/extension.h b/chrome/browser/extensions/extension.h index 16260e0..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 @@ class Extension { // 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 @@ class Extension { DISALLOW_COPY_AND_ASSIGN(Extension); }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H__ +#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |