summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/sandboxed_extension_unpacker.cc
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 19:11:38 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-26 19:11:38 +0000
commitc366ad280c032aed580af147b2285d45649ad29b (patch)
tree8aef07bf9b5b862e1c623826c527492c9fe12dee /chrome/browser/extensions/sandboxed_extension_unpacker.cc
parentd6b3999f71631506c1b390707f205929bdfa221e (diff)
downloadchromium_src-c366ad280c032aed580af147b2285d45649ad29b.zip
chromium_src-c366ad280c032aed580af147b2285d45649ad29b.tar.gz
chromium_src-c366ad280c032aed580af147b2285d45649ad29b.tar.bz2
Revert r63919 "Part 2 of immutable Extension refactor."
Compile failure on Linux x64. BUG=56558 TEST=no functional change TBR=aa Review URL: http://codereview.chromium.org/4156002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/sandboxed_extension_unpacker.cc')
-rw-r--r--chrome/browser/extensions/sandboxed_extension_unpacker.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
index ea5ec64..fc8aea8 100644
--- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc
+++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc
@@ -140,20 +140,18 @@ void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded(
// extension was unpacked to. We use this until the extension is finally
// installed. For example, the install UI shows images from inside the
// extension.
+ extension_.reset(new Extension(extension_root_));
// Localize manifest now, so confirm UI gets correct extension name.
std::string error;
- if (!extension_l10n_util::LocalizeExtension(extension_root_,
+ if (!extension_l10n_util::LocalizeExtension(extension_.get(),
final_manifest.get(),
&error)) {
ReportFailure(error);
return;
}
- extension_ = Extension::Create(
- extension_root_, Extension::INTERNAL, *final_manifest, true, &error);
-
- if (!extension_.get()) {
+ if (!extension_->InitFromValue(*final_manifest, true, &error)) {
ReportFailure(std::string("Manifest is invalid: ") + error);
return;
}
@@ -272,8 +270,8 @@ void SandboxedExtensionUnpacker::ReportFailure(const std::string& error) {
void SandboxedExtensionUnpacker::ReportSuccess() {
// Client takes ownership of temporary directory and extension.
- client_->OnUnpackSuccess(temp_dir_.Take(), extension_root_, extension_);
- extension_ = NULL;
+ client_->OnUnpackSuccess(temp_dir_.Take(), extension_root_,
+ extension_.release());
}
DictionaryValue* SandboxedExtensionUnpacker::RewriteManifestFile(