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

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: Added curlies 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
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..17aae83415a52640eb2336ae2ecd6454ffd2a20a 100644
--- a/chrome/browser/history/top_sites_extension_api.cc
+++ b/chrome/browser/history/top_sites_extension_api.cc
@@ -29,24 +29,17 @@ 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);
brettw 2012/03/21 18:16:01 I don't really know what this filler code was doin
cduvall 2012/03/21 18:33:49 The filler was for urls that were empty, to let th
+ if (!url.url.is_empty()) {
+ NewTabUI::SetURLTitleAndDirection(page_value,
Aaron Boodman 2012/03/21 21:26:15 I don't think that we should call this for extensi
cduvall 2012/03/21 22:00:14 Done.
+ 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);

Powered by Google App Engine
This is Rietveld 408576698