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

Unified Diff: chrome/browser/ui/webui/ntp/suggestions_page_handler.cc

Issue 9583033: NTP: Fix a leak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify. Created 8 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/ui/webui/ntp/suggestions_page_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
index 20c7b4fb16b2c8565adf0b9e23bdb1cdccbfd948..2ec97c676850c4b1b6bd8eada0821e7825bbd619 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.cc
@@ -136,11 +136,10 @@ void SuggestionsHandler::SetPagesValueFromTopSites(
pages_value_.reset(new ListValue());
for (size_t i = 0; i < data.size(); i++) {
const history::MostVisitedURL& suggested_url = data[data.size() - i - 1];
- DictionaryValue* page_value = new DictionaryValue();
- if (suggested_url.url.is_empty()) {
+ if (suggested_url.url.is_empty())
continue;
- }
+ DictionaryValue* page_value = new DictionaryValue();
NewTabUI::SetURLTitleAndDirection(page_value,
suggested_url.title,
suggested_url.url);
« 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