summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/crx_installer.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/crx_installer.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/crx_installer.cc')
-rw-r--r--chrome/browser/extensions/crx_installer.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 83fdcb7..8b523d5 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -141,8 +141,8 @@ void CrxInstaller::InstallUserScript(const FilePath& source_file,
void CrxInstaller::ConvertUserScriptOnFileThread() {
std::string error;
- scoped_refptr<Extension> extension =
- ConvertUserScriptToExtension(source_file_, original_url_, &error);
+ Extension* extension = ConvertUserScriptToExtension(source_file_,
+ original_url_, &error);
if (!extension) {
ReportFailureFromFileThread(error);
return;
@@ -237,7 +237,7 @@ void CrxInstaller::OnUnpackSuccess(const FilePath& temp_dir,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Note: We take ownership of |extension| and |temp_dir|.
- extension_ = extension;
+ extension_.reset(extension);
temp_dir_ = temp_dir;
// We don't have to delete the unpack dir explicity since it is a child of
@@ -351,8 +351,8 @@ void CrxInstaller::CompleteInstall() {
// TODO(aa): All paths to resources inside extensions should be created
// lazily and based on the Extension's root path at that moment.
std::string error;
- extension_ = extension_file_util::LoadExtension(
- version_dir, install_source_, true, &error);
+ extension_.reset(extension_file_util::LoadExtension(
+ version_dir, install_source_, true, &error));
DCHECK(error.empty());
ReportSuccessFromFileThread();
@@ -400,8 +400,8 @@ void CrxInstaller::ReportSuccessFromUIThread() {
// Tell the frontend about the installation and hand off ownership of
// extension_ to it.
- frontend_->OnExtensionInstalled(extension_, allow_privilege_increase_);
- extension_ = NULL;
+ frontend_->OnExtensionInstalled(extension_.release(),
+ allow_privilege_increase_);
// We're done. We don't post any more tasks to ourselves so we are deleted
// soon.