Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2276)

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 27215: Fix a memory leak in extension install. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
===================================================================
--- chrome/browser/extensions/extensions_service.cc (revision 10469)
+++ chrome/browser/extensions/extensions_service.cc (working copy)
@@ -717,7 +717,17 @@
// After it's installed, load it right away with the same settings.
extension_path_ = path;
- LoadExtensionCurrentVersion();
+ LOG(INFO) << "Loading extension " << path.value();
+ Extension* extension = LoadExtensionCurrentVersion();
+ if (extension) {
+ // Only one extension, but ReportExtensionsLoaded can handle multiple,
+ // so we need to construct a list.
+ scoped_ptr<ExtensionList> extensions(new ExtensionList);
+ extensions->push_back(extension);
+ LOG(INFO) << "Done.";
+ // Hand off ownership of the loaded extensions to the frontend.
+ ReportExtensionsLoaded(extensions.release());
+ }
}
// Some extensions will autoupdate themselves externally from Chrome. These
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698