From 0f9f337262c383b94dce482aba0fac7e5778c852 Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Tue, 26 Oct 2010 22:32:07 +0000 Subject: Unrevert r63919: "Part 2 of immutable Extension refactor." I made Extension a refcounted object, and privitized the existing con/destructor and InitFromValue. The only way to get an Extension is to call a factory method. In the next CL, I plan to make the factory method return a const Extension, to guarantee that no one can modify the Extension object after creation. Note: There was a tricky part of this CL because of the difference in semantics between scoped_ptr and scoped_refptr. I had to be careful not to use ptr.release(), since that would result in leaks (an un-Released AddRef). BUG=56558 TEST=no functional change Original Review URL: http://codereview.chromium.org/3982001 TBR=aa Review URL: http://codereview.chromium.org/4186002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63962 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_creator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chrome/browser/extensions/extension_creator.cc') diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index 86c78fe..8bd68a2 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -56,7 +56,7 @@ bool ExtensionCreator::InitializeInput( // Load the extension once. We don't really need it, but this does a lot of // useful validation of the structure. - scoped_ptr extension( + scoped_refptr extension( extension_file_util::LoadExtension(extension_dir, Extension::INTERNAL, false, // key not required -- cgit v1.1