diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 04:48:33 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 04:48:33 +0000 |
commit | ad93c6baf3651dc050ab436bd0cfd84bdabf7127 (patch) | |
tree | cfdce3f00588c165122731612c519b0d6ebd0728 /chrome/browser/extensions/sandboxed_extension_unpacker.cc | |
parent | b5cca98eb4857dfd170c3f2427cbcc2a1189cd06 (diff) | |
download | chromium_src-ad93c6baf3651dc050ab436bd0cfd84bdabf7127.zip chromium_src-ad93c6baf3651dc050ab436bd0cfd84bdabf7127.tar.gz chromium_src-ad93c6baf3651dc050ab436bd0cfd84bdabf7127.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/extensions/sandboxed_extension_unpacker.cc')
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 8e31ddf..b8eb88c 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -284,7 +284,7 @@ void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( if (!RewriteCatalogFiles()) return; - ReportSuccess(); + ReportSuccess(manifest); } void SandboxedExtensionUnpacker::OnUnpackExtensionFailed( @@ -480,14 +480,18 @@ void SandboxedExtensionUnpacker::ReportFailure(FailureReason reason, client_->OnUnpackFailure(error); } -void SandboxedExtensionUnpacker::ReportSuccess() { +void SandboxedExtensionUnpacker::ReportSuccess( + const DictionaryValue& original_manifest) { UMA_HISTOGRAM_COUNTS("Extensions.SandboxUnpackSuccess", 1); RecordSuccessfulUnpackTimeHistograms( crx_path_, base::TimeTicks::Now() - unpack_start_time_); // Client takes ownership of temporary directory and extension. - client_->OnUnpackSuccess(temp_dir_.Take(), extension_root_, extension_); + client_->OnUnpackSuccess(temp_dir_.Take(), + extension_root_, + &original_manifest, + extension_); extension_ = NULL; } |