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

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

Issue 9721013: Move topSites API out of experimental (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved topSites API out of experimental Created 8 years, 9 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 | « chrome/browser/history/top_sites_extension_api.h ('k') | chrome/common/common_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/top_sites_extension_api.cc
diff --git a/chrome/browser/history/top_sites_extension_api.cc b/chrome/browser/history/top_sites_extension_api.cc
index 6a8c4b2f69deb44f3b4a843a9f4b7d12b42fae7d..9808c763926716f7340518ca168e29ac90207e36 100644
--- a/chrome/browser/history/top_sites_extension_api.cc
+++ b/chrome/browser/history/top_sites_extension_api.cc
@@ -29,24 +29,16 @@ bool GetTopSitesFunction::RunImpl() {
void GetTopSitesFunction::OnMostVisitedURLsAvailable(
const history::MostVisitedURLList& data) {
- // Code is a direct rip from most_visited_handler.cc TODO(estade): unfork.
scoped_ptr<base::ListValue> pages_value(new ListValue);
for (size_t i = 0; i < data.size(); i++) {
const history::MostVisitedURL& url = data[i];
DictionaryValue* page_value = new DictionaryValue();
- if (url.url.is_empty()) {
- page_value->SetBoolean("filler", true);
+ if (!url.url.is_empty())
brettw 2012/03/21 17:43:22 You either messed up your indenting or you need {}
cduvall 2012/03/21 18:00:34 Oops, Done.
+ NewTabUI::SetURLTitleAndDirection(page_value,
+ url.title,
+ url.url);
pages_value->Append(page_value);
- continue;
- }
-
- NewTabUI::SetURLTitleAndDirection(page_value,
- url.title,
- url.url);
-
- pages_value->Append(page_value);
}
- // End copied code. ----------------------------------------------------------
result_.reset(pages_value.release());
SendResponse(true);
« no previous file with comments | « chrome/browser/history/top_sites_extension_api.h ('k') | chrome/common/common_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698