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

Unified Diff: components/history/core/browser/top_sites.cc

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 years, 11 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 | « components/history/core/browser/top_sites.h ('k') | components/history/core/browser/top_sites_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/top_sites.cc
diff --git a/chrome/browser/history/top_sites.cc b/components/history/core/browser/top_sites.cc
similarity index 53%
rename from chrome/browser/history/top_sites.cc
rename to components/history/core/browser/top_sites.cc
index cf1d9dfebfbb0b5b8c764651fc8a0a344166ea45..49de25901f13d37550ec24b3fd8a95dbe85bc0e9 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/components/history/core/browser/top_sites.cc
@@ -2,31 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/history/top_sites.h"
+#include "components/history/core/browser/top_sites.h"
-#include "base/strings/string_util.h"
-#include "chrome/grit/chromium_strings.h"
-#include "chrome/grit/generated_resources.h"
-#include "chrome/grit/locale_settings.h"
#include "components/history/core/browser/top_sites_observer.h"
-#include "grit/theme_resources.h"
namespace history {
-const TopSites::PrepopulatedPage kPrepopulatedPages[] = {
-#if !defined(OS_ANDROID)
- {IDS_CHROME_WELCOME_URL,
- IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE,
- IDR_PRODUCT_LOGO_16,
- IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL,
- SkColorSetRGB(0, 147, 60)},
- {IDS_WEBSTORE_URL,
- IDS_EXTENSION_WEB_STORE_TITLE,
- IDR_WEBSTORE_ICON_16,
- IDR_NEWTAB_WEBSTORE_THUMBNAIL,
- SkColorSetRGB(63, 132, 197)}
-#endif
-};
+PrepopulatedPage::PrepopulatedPage()
+ : most_visited(), favicon_id(-1), thumbnail_id(-1), color() {
+}
+
+PrepopulatedPage::PrepopulatedPage(const GURL& url,
+ const base::string16& title,
+ int favicon_id,
+ int thumbnail_id,
+ SkColor color)
+ : most_visited(url, title),
+ favicon_id(favicon_id),
+ thumbnail_id(thumbnail_id),
+ color(color) {
+ most_visited.redirects.push_back(url);
+}
TopSites::TopSites() {
}
« no previous file with comments | « components/history/core/browser/top_sites.h ('k') | components/history/core/browser/top_sites_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698