| 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 b6a529b785df8c44f037eb5a4bf0b8d4ab329c8a..0d3657010040680fc86555b701b28ebfed45f2fa 100644
|
| --- a/chrome/browser/history/chrome_history_client.cc
|
| +++ b/chrome/browser/history/chrome_history_client.cc
|
| @@ -5,32 +5,19 @@
|
| #include "chrome/browser/history/chrome_history_client.h"
|
|
|
| #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/ui/profile_error_dialog.h"
|
| #include "chrome/common/chrome_version_info.h"
|
| #include "chrome/grit/chromium_strings.h"
|
| #include "chrome/grit/generated_resources.h"
|
| #include "components/bookmarks/browser/bookmark_model.h"
|
| -#include "content/public/browser/notification_service.h"
|
|
|
| -using bookmarks::BookmarkModel;
|
| -
|
| -ChromeHistoryClient::ChromeHistoryClient(BookmarkModel* bookmark_model,
|
| - Profile* profile,
|
| - history::TopSites* top_sites)
|
| - : bookmark_model_(bookmark_model),
|
| - profile_(profile),
|
| - top_sites_(top_sites) {
|
| +ChromeHistoryClient::ChromeHistoryClient(
|
| + bookmarks::BookmarkModel* bookmark_model)
|
| + : bookmark_model_(bookmark_model) {
|
| DCHECK(bookmark_model_);
|
| - if (top_sites_)
|
| - top_sites_->AddObserver(this);
|
| }
|
|
|
| ChromeHistoryClient::~ChromeHistoryClient() {
|
| - if (top_sites_)
|
| - top_sites_->RemoveObserver(this);
|
| }
|
|
|
| void ChromeHistoryClient::BlockUntilBookmarksLoaded() {
|
| @@ -43,7 +30,7 @@ bool ChromeHistoryClient::IsBookmarked(const GURL& url) {
|
|
|
| void ChromeHistoryClient::GetBookmarks(
|
| std::vector<history::URLAndTitle>* bookmarks) {
|
| - std::vector<BookmarkModel::URLAndTitle> bookmarks_url_and_title;
|
| + std::vector<bookmarks::BookmarkModel::URLAndTitle> bookmarks_url_and_title;
|
| bookmark_model_->GetBookmarks(&bookmarks_url_and_title);
|
|
|
| bookmarks->reserve(bookmarks->size() + bookmarks_url_and_title.size());
|
| @@ -82,17 +69,3 @@ void ChromeHistoryClient::Shutdown() {
|
| // sees an incorrect view of bookmarks, but it's better than a deadlock.
|
| bookmark_model_->Shutdown();
|
| }
|
| -
|
| -void ChromeHistoryClient::TopSitesLoaded(history::TopSites* top_sites) {
|
| - content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_TOP_SITES_LOADED,
|
| - content::Source<Profile>(profile_),
|
| - content::Details<history::TopSites>(top_sites));
|
| -}
|
| -
|
| -void ChromeHistoryClient::TopSitesChanged(history::TopSites* top_sites) {
|
| - content::NotificationService::current()->Notify(
|
| - chrome::NOTIFICATION_TOP_SITES_CHANGED,
|
| - content::Source<history::TopSites>(top_sites),
|
| - content::NotificationService::NoDetails());
|
| -}
|
|
|