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

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

Issue 160509: Fix memory leak introduced by r22043. (Closed)
Patch Set: remove supression Created 11 years, 5 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 | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index bf657c7fcce0be8696dc6fe40c1f3017e57180a9..cebb46a3d438bcf5a8900d4ec7b82636d3fa7304 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -369,9 +369,9 @@ void ExtensionsService::OnExternalExtensionFound(const std::string& id,
// version. This is important because these extensions are going to get
// installed on every startup.
Extension* existing = GetExtensionById(id);
+ scoped_ptr<Version> other(Version::GetVersionFromString(version));
if (existing) {
- switch (existing->version()->CompareTo(
- *Version::GetVersionFromString(version))) {
+ switch (existing->version()->CompareTo(*other)) {
case -1: // existing version is older, we should upgrade
break;
case 0: // existing version is same, do nothing
« no previous file with comments | « no previous file | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698