| Index: chrome/browser/history/chrome_history_client.cc
|
| diff --git a/chrome/browser/history/chrome_history_client.cc b/chrome/browser/history/chrome_history_client.cc
|
| index ea979be370bd4b1b531ab34ba7b888559f0cacec..5fe73b587931b88412f650d2ba735c218cc2a696 100644
|
| --- a/chrome/browser/history/chrome_history_client.cc
|
| +++ b/chrome/browser/history/chrome_history_client.cc
|
| @@ -7,7 +7,7 @@
|
| #include "base/logging.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| #include "chrome/browser/history/history_notifications.h"
|
| -#include "chrome/browser/history/top_sites.h"
|
| +#include "chrome/browser/history/top_sites_provider.h"
|
| #include "chrome/browser/ui/profile_error_dialog.h"
|
| #include "chrome/common/chrome_version_info.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| @@ -15,20 +15,21 @@
|
| #include "components/bookmarks/browser/bookmark_model.h"
|
| #include "content/public/browser/notification_service.h"
|
|
|
| -ChromeHistoryClient::ChromeHistoryClient(BookmarkModel* bookmark_model,
|
| - Profile* profile,
|
| - history::TopSites* top_sites)
|
| +ChromeHistoryClient::ChromeHistoryClient(
|
| + BookmarkModel* bookmark_model,
|
| + Profile* profile,
|
| + history::TopSitesProvider* top_sites_provider)
|
| : bookmark_model_(bookmark_model),
|
| profile_(profile),
|
| - top_sites_(top_sites) {
|
| + top_sites_provider_(top_sites_provider) {
|
| DCHECK(bookmark_model_);
|
| - if (top_sites_)
|
| - top_sites_->AddObserver(this);
|
| + if (top_sites_provider_)
|
| + top_sites_provider_->AddObserver(this);
|
| }
|
|
|
| ChromeHistoryClient::~ChromeHistoryClient() {
|
| - if (top_sites_)
|
| - top_sites_->RemoveObserver(this);
|
| + if (top_sites_provider_)
|
| + top_sites_provider_->RemoveObserver(this);
|
| }
|
|
|
| void ChromeHistoryClient::BlockUntilBookmarksLoaded() {
|
| @@ -81,16 +82,17 @@ void ChromeHistoryClient::Shutdown() {
|
| bookmark_model_->Shutdown();
|
| }
|
|
|
| -void ChromeHistoryClient::TopSitesLoaded(history::TopSites* top_sites) {
|
| +void ChromeHistoryClient::TopSitesLoaded(
|
| + history::TopSitesProvider* top_sites_provider) {
|
| content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_TOP_SITES_LOADED,
|
| - content::Source<Profile>(profile_),
|
| - content::Details<history::TopSites>(top_sites));
|
| + chrome::NOTIFICATION_TOP_SITES_LOADED, content::Source<Profile>(profile_),
|
| + content::Details<history::TopSitesProvider>(top_sites_provider));
|
| }
|
|
|
| -void ChromeHistoryClient::TopSitesChanged(history::TopSites* top_sites) {
|
| +void ChromeHistoryClient::TopSitesChanged(
|
| + history::TopSitesProvider* top_sites_provider) {
|
| content::NotificationService::current()->Notify(
|
| chrome::NOTIFICATION_TOP_SITES_CHANGED,
|
| - content::Source<history::TopSites>(top_sites),
|
| + content::Source<history::TopSitesProvider>(top_sites_provider),
|
| content::NotificationService::NoDetails());
|
| }
|
|
|