diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 18:54:58 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-26 18:54:58 +0000 |
commit | 9118e93ad88c2809973d1b2f97299cfe1601f20c (patch) | |
tree | 1a74f9c7570f53c4c6e3619f35111f2e8e4bc6fd /chrome/common/extensions/extension_l10n_util.cc | |
parent | d603cd3c0923238c5f8fbd755a04df7e3923a2f4 (diff) | |
download | chromium_src-9118e93ad88c2809973d1b2f97299cfe1601f20c.zip chromium_src-9118e93ad88c2809973d1b2f97299cfe1601f20c.tar.gz chromium_src-9118e93ad88c2809973d1b2f97299cfe1601f20c.tar.bz2 |
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
Review URL: http://codereview.chromium.org/3982001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension_l10n_util.cc')
-rw-r--r-- | chrome/common/extensions/extension_l10n_util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc index 4187689..53950cb 100644 --- a/chrome/common/extensions/extension_l10n_util.cc +++ b/chrome/common/extensions/extension_l10n_util.cc @@ -113,7 +113,7 @@ bool LocalizeManifest(const ExtensionMessageBundle& messages, return true; } -bool LocalizeExtension(Extension* extension, +bool LocalizeExtension(const FilePath& extension_path, DictionaryValue* manifest, std::string* error) { DCHECK(manifest); @@ -122,7 +122,7 @@ bool LocalizeExtension(Extension* extension, scoped_ptr<ExtensionMessageBundle> message_bundle( extension_file_util::LoadExtensionMessageBundle( - extension->path(), default_locale, error)); + extension_path, default_locale, error)); if (!message_bundle.get() && !error->empty()) return false; |