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

Side by Side Diff: chrome/browser/history/top_sites.cc

Issue 7610014: [ntp4] Bookmarks page implementation, first-pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Final review tweaks, rebase. Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/top_sites.h" 5 #include "chrome/browser/history/top_sites.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 644 }
645 645
646 // static 646 // static
647 MostVisitedURLList TopSites::GetPrepopulatePages() { 647 MostVisitedURLList TopSites::GetPrepopulatePages() {
648 MostVisitedURLList urls; 648 MostVisitedURLList urls;
649 urls.resize(arraysize(kPrepopulatePageIDs)); 649 urls.resize(arraysize(kPrepopulatePageIDs));
650 for (size_t i = 0; i < arraysize(kPrepopulatePageIDs); ++i) { 650 for (size_t i = 0; i < arraysize(kPrepopulatePageIDs); ++i) {
651 MostVisitedURL& url = urls[i]; 651 MostVisitedURL& url = urls[i];
652 url.url = GURL(l10n_util::GetStringUTF8(kPrepopulatePageIDs[i])); 652 url.url = GURL(l10n_util::GetStringUTF8(kPrepopulatePageIDs[i]));
653 url.redirects.push_back(url.url); 653 url.redirects.push_back(url.url);
654 url.favicon_url = NewTabUI::Ntp4Enabled() ? 654 url.favicon_url = NewTabUI::NTP4Enabled() ?
655 GURL(kNewPrepopulateFaviconURLs[i]) : 655 GURL(kNewPrepopulateFaviconURLs[i]) :
656 GURL(kPrepopulateFaviconURLs[i]); 656 GURL(kPrepopulateFaviconURLs[i]);
657 url.title = l10n_util::GetStringUTF16(kPrepopulateTitleIDs[i]); 657 url.title = l10n_util::GetStringUTF16(kPrepopulateTitleIDs[i]);
658 } 658 }
659 return urls; 659 return urls;
660 } 660 }
661 661
662 // static 662 // static
663 bool TopSites::AddPrepopulatedPages(MostVisitedURLList* urls) { 663 bool TopSites::AddPrepopulatedPages(MostVisitedURLList* urls) {
664 bool added = false; 664 bool added = false;
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 SetTopSites(pages); 1006 SetTopSites(pages);
1007 1007
1008 // Used only in testing. 1008 // Used only in testing.
1009 NotificationService::current()->Notify( 1009 NotificationService::current()->Notify(
1010 chrome::NOTIFICATION_TOP_SITES_UPDATED, 1010 chrome::NOTIFICATION_TOP_SITES_UPDATED,
1011 Source<TopSites>(this), 1011 Source<TopSites>(this),
1012 Details<CancelableRequestProvider::Handle>(&handle)); 1012 Details<CancelableRequestProvider::Handle>(&handle));
1013 } 1013 }
1014 1014
1015 } // namespace history 1015 } // namespace history
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/bookmarks_page.css » ('j') | chrome/browser/resources/ntp4/bookmarks_page.css » ('J')

Powered by Google App Engine
This is Rietveld 408576698