Change the web store private install API to accept a localized extension name.
In our initial design of the beginInstallWithManifest function, we forgot that
some extensions have a name which needs token substitution for i18n/l10n. This
change renames beginInstallWithManifest to beginInstallWithManifest2, and
modifies the signature to take optional localizedName and locale parameters.
I also refactored how we compare the passed in manifest used in the
pre-download confirmation dialog - we now keep a copy of the source from the
.crx file to compare against, since i18n substututions can happen on the
manifest we use to construct the Extension object.
BUG=75821
TEST=Covered by browser tests for now; will require web store server-side
changes before it can be manually tested.
Review URL: http://codereview.chromium.org/6992047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86780 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.h b/chrome/browser/extensions/sandboxed_extension_unpacker.h
index 7294b39..9c10886 100644
--- a/chrome/browser/extensions/sandboxed_extension_unpacker.h
+++ b/chrome/browser/extensions/sandboxed_extension_unpacker.h
@@ -25,10 +25,14 @@
//
// extension_root - The path to the extension root inside of temp_dir.
//
+ // original_manifest - The parsed but unmodified version of the manifest,
+ // with no modifications such as localization, etc.
+ //
// extension - The extension that was unpacked. The client is responsible
// for deleting this memory.
virtual void OnUnpackSuccess(const FilePath& temp_dir,
const FilePath& extension_root,
+ const DictionaryValue* original_manifest,
const Extension* extension) = 0;
virtual void OnUnpackFailure(const std::string& error) = 0;
@@ -189,7 +193,7 @@
virtual void OnProcessCrashed(int exit_code);
void ReportFailure(FailureReason reason, const std::string& message);
- void ReportSuccess();
+ void ReportSuccess(const DictionaryValue& original_manifest);
// Overwrites original manifest with safe result from utility process.
// Returns NULL on error. Caller owns the returned object.