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

Unified Diff: chrome/browser/history/top_sites.cc

Issue 3023018: Fix memory leaks in TopSites. (Closed)
Patch Set: Real fix + unsuppress leaks. Created 10 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/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites.cc
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 348ab7b6730e655c7556de4f9bad112030ef8ad7..950bb2fbf55801581d84bb33063bac61fbe47754 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -659,8 +659,7 @@ bool TopSites::IsBlacklisted(const GURL& url) {
}
void TopSites::RemoveBlacklistedURL(const GURL& url) {
- Value* dummy = NULL;
- blacklist_->RemoveWithoutPathExpansion(GetURLHash(url), &dummy);
+ blacklist_->RemoveWithoutPathExpansion(GetURLHash(url), NULL);
}
void TopSites::ClearBlacklistedURLs() {
@@ -682,8 +681,7 @@ void TopSites::AddPinnedURL(const GURL& url, size_t pinned_index) {
}
void TopSites::RemovePinnedURL(const GURL& url) {
- Value* dummy = NULL;
- pinned_urls_->RemoveWithoutPathExpansion(GetURLString(url), &dummy);
+ pinned_urls_->RemoveWithoutPathExpansion(GetURLString(url), NULL);
}
bool TopSites::GetIndexOfPinnedURL(const GURL& url, size_t* index) {
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698