OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
sdefresne
2014/12/19 15:11:40
Do not change copyright notice when renaming files
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
sdefresne
2014/12/19 15:11:40
Why is this file not marked as moved but as new?
| |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/history/top_sites_provider.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "base/strings/string_util.h" | |
9 #include "chrome/browser/history/top_sites_service.h" | |
10 #include "chrome/grit/chromium_strings.h" | |
11 #include "chrome/grit/generated_resources.h" | |
12 #include "chrome/grit/locale_settings.h" | |
13 #include "grit/theme_resources.h" | |
14 | |
15 namespace history { | |
16 | |
17 const TopSitesProvider::PrepopulatedPage kPrepopulatedPages[] = { | |
18 #if !defined(OS_ANDROID) | |
19 {IDS_CHROME_WELCOME_URL, | |
20 IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE, | |
21 IDR_PRODUCT_LOGO_16, | |
22 IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL, | |
23 SkColorSetRGB(0, 147, 60)}, | |
24 {IDS_WEBSTORE_URL, | |
25 IDS_EXTENSION_WEB_STORE_TITLE, | |
26 IDR_WEBSTORE_ICON_16, | |
27 IDR_NEWTAB_WEBSTORE_THUMBNAIL, | |
28 SkColorSetRGB(63, 132, 197)} | |
29 #endif | |
30 }; | |
31 | |
32 // This function needs to remove | |
33 // static | |
34 TopSitesProvider* TopSitesProvider::Create(Profile* profile, | |
sdefresne
2014/12/19 15:11:40
Remove this method, it should instead be the respo
| |
35 const base::FilePath& db_name) { | |
36 TopSitesService* top_sites_service = new TopSitesService(profile); | |
37 top_sites_service->Init(db_name); | |
38 return top_sites_service; | |
39 } | |
40 | |
41 TopSitesProvider::TopSitesProvider() { | |
sdefresne
2014/12/19 15:11:40
You define the constructor in the header and the i
| |
42 } | |
43 | |
44 TopSitesProvider::~TopSitesProvider() { | |
45 } | |
46 | |
47 void TopSitesProvider::AddObserver(TopSitesObserver* observer) { | |
48 observer_list_.AddObserver(observer); | |
49 } | |
50 | |
51 void TopSitesProvider::RemoveObserver(TopSitesObserver* observer) { | |
52 observer_list_.RemoveObserver(observer); | |
53 } | |
54 | |
55 void TopSitesProvider::NotifyTopSitesLoaded() { | |
56 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesLoaded(this)); | |
57 } | |
58 | |
59 void TopSitesProvider::NotifyTopSitesChanged() { | |
60 FOR_EACH_OBSERVER(TopSitesObserver, observer_list_, TopSitesChanged(this)); | |
61 } | |
62 | |
63 } // namespace history | |
OLD | NEW |