Index: chrome/browser/extensions/crx_installer.h |
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h |
index 17595174e4f1628ce4c9561ce60b39ec7332b6f4..1258d9e1c7379a70615014bd38263f0270147cc0 100644 |
--- a/chrome/browser/extensions/crx_installer.h |
+++ b/chrome/browser/extensions/crx_installer.h |
@@ -55,21 +55,26 @@ class CrxInstaller |
// crbug.com/54916 |
static void SetWhitelistedInstallId(const std::string& id); |
+ struct WhitelistEntry { |
+ scoped_ptr<DictionaryValue> parsed_manifest; |
+ std::string localized_name; |
+ }; |
+ |
// Exempt the next extension install with |id| from displaying a confirmation |
// prompt, since the user already agreed to the install via |
// beginInstallWithManifest. We require that the extension manifest matches |
- // |parsed_manifest| which is what was used to prompt with. Ownership of |
- // |parsed_manifest| is transferred here. |
- static void SetWhitelistedManifest(const std::string& id, |
- DictionaryValue* parsed_manifest); |
+ // the manifest in |entry|, which is what was used to prompt with. Ownership |
+ // of |entry| is transferred here. |
+ static void SetWhitelistEntry(const std::string& id, |
Matt Perry
2011/05/25 01:46:06
nit: can fit on 1 line looks like
asargent_no_longer_on_chrome
2011/05/25 04:42:00
Done.
|
+ WhitelistEntry* entry); |
- // Returns the previously stored manifest from a call to |
- // SetWhitelistedManifest. |
- static const DictionaryValue* GetWhitelistedManifest(const std::string& id); |
+ // Returns the previously stored manifest from a call to SetWhitelistEntry. |
+ static const CrxInstaller::WhitelistEntry* GetWhitelistEntry( |
+ const std::string& id); |
- // Removes any whitelisted manifest for |id| and returns it. The caller owns |
+ // Removes any whitelist data for |id| and returns it. The caller owns |
// the return value and is responsible for deleting it. |
- static DictionaryValue* RemoveWhitelistedManifest(const std::string& id); |
+ static WhitelistEntry* RemoveWhitelistEntry(const std::string& id); |
// Returns whether |id| is whitelisted - only call this on the UI thread. |
static bool IsIdWhitelisted(const std::string& id); |
@@ -159,6 +164,7 @@ class CrxInstaller |
virtual void OnUnpackFailure(const std::string& error_message); |
virtual void OnUnpackSuccess(const FilePath& temp_dir, |
const FilePath& extension_dir, |
+ const DictionaryValue* original_manifest, |
const Extension* extension); |
// Returns true if we can skip confirmation because the install was |
@@ -224,6 +230,10 @@ class CrxInstaller |
// ExtensionService on success, or delete it on failure. |
scoped_refptr<const Extension> extension_; |
+ // A parsed copy of the unmodified original manifest, before any |
+ // transformations like localization have taken place. |
+ scoped_ptr<DictionaryValue> original_manifest_; |
+ |
// If non-empty, contains the current version of the extension we're |
// installing (for upgrades). |
std::string current_version_; |