[Extensions] Rework ExtensionUpdater to not be RefCountedThreadSafe
Make ExtensionUpdater pass weak pointers to ExtensionUpdaterFileHandler
and SafeManifestParser.
Fix latent bug where SafeManifestParser would hold a reference to a string
on the stack.
Check all instances of PostTask. Avoid leaking temp files when possible.
BUG=
TEST=
Review URL: http://codereview.chromium.org/6826045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81299 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 17e5154..05592840 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -435,11 +435,11 @@
switches::kExtensionsUpdateFrequency),
&update_frequency);
}
- updater_ = new ExtensionUpdater(this,
- extension_prefs,
- profile->GetPrefs(),
- profile,
- update_frequency);
+ updater_.reset(new ExtensionUpdater(this,
+ extension_prefs,
+ profile->GetPrefs(),
+ profile,
+ update_frequency));
}
backend_ = new ExtensionServiceBackend(install_directory_);