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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/history/core/browser/top_sites.h"
6
7 namespace history {
8
9 PrepopulatedPage::PrepopulatedPage()
10 : url(), favicon_id(-1), thumbnail_id(-1), color() {
11 }
12
13 PrepopulatedPage::PrepopulatedPage(const GURL& url,
14 const base::string16& title,
15 int favicon_id,
16 int thumbnail_id,
17 SkColor color)
18 : url(url, title),
19 favicon_id(favicon_id),
20 thumbnail_id(thumbnail_id),
21 color(color) {
22 this->url.redirects.push_back(url);
23 }
24
25 TopSites::TopSites() {
26 }
27
28 TopSites::~TopSites() {
29 }
30
31 void TopSites::AddObserver(TopSitesObserver* observer) {
32 observer_list_.AddObserver(observer);
33 }
34
35 void TopSites::RemoveObserver(TopSitesObserver* observer) {
36 observer_list_.RemoveObserver(observer);
37 }
38
39 void TopSites::NotifyTopSitesLoaded() {
40 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesLoaded(this));
41 }
42
43 void TopSites::NotifyTopSitesChanged() {
44 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesChanged(this));
45 }
46
47 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698