diff options
author | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 17:19:02 +0000 |
---|---|---|
committer | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-07 17:19:02 +0000 |
commit | 0e7d57fa87b02031db31444a22cba54b32405896 (patch) | |
tree | 375a9a54ee14ef2eb66317ec074c280450f652e1 /chrome/browser/dom_ui | |
parent | f93d639888a72686e72f49e57fb4d42eab32cb04 (diff) | |
download | chromium_src-0e7d57fa87b02031db31444a22cba54b32405896.zip chromium_src-0e7d57fa87b02031db31444a22cba54b32405896.tar.gz chromium_src-0e7d57fa87b02031db31444a22cba54b32405896.tar.bz2 |
Remove ThumbnailStore - replaced by TopSites.
BUG=none
TEST=open New Tab page, see thumbnails. Same with chrome --top-sites.
Review URL: http://codereview.chromium.org/2815045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_thumbnail_source.cc | 31 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_thumbnail_source.h | 11 |
2 files changed, 1 insertions, 41 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc index 5664cd5..a89c92f 100644 --- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc +++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc @@ -9,7 +9,6 @@ #include "base/command_line.h" #include "chrome/browser/profile.h" #include "chrome/browser/history/top_sites.h" -#include "chrome/browser/thumbnail_store.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/url_constants.h" @@ -62,19 +61,6 @@ void DOMUIThumbnailSource::SendDefaultThumbnail(int request_id) { SendResponse(request_id, default_thumbnail_); } -// TODO(Nik): remove. ThumbnailStore is to be replaced with TopSites. -void DOMUIThumbnailSource::DoDataRequest(const std::string& path, - int request_id) { - RefCountedBytes* data = NULL; - scoped_refptr<ThumbnailStore> store_ = profile_->GetThumbnailStore(); - if (store_->GetPageThumbnail(GURL(path), &data)) { - // Got the thumbnail. - SendResponse(request_id, data); - } else { - SendDefaultThumbnail(request_id); - } -} - void DOMUIThumbnailSource::OnThumbnailDataAvailable( HistoryService::Handle request_handle, scoped_refptr<RefCountedBytes> data) { @@ -88,20 +74,3 @@ void DOMUIThumbnailSource::OnThumbnailDataAvailable( SendDefaultThumbnail(request_id); } } - -void DOMUIThumbnailSource::Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details) { - if (type.value != NotificationType::THUMBNAIL_STORE_READY) { - NOTREACHED(); - return; - } - - // This notification is sent only once. - registrar_.RemoveAll(); - - for (size_t i = 0; i < pending_requests_.size(); ++i) - DoDataRequest(pending_requests_[i].first, pending_requests_[i].second); - - pending_requests_.clear(); -} diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.h b/chrome/browser/dom_ui/dom_ui_thumbnail_source.h index d916aa4..cadf542 100644 --- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.h +++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.h @@ -20,8 +20,7 @@ class ThumbnailStore; // ThumbnailSource is the gateway between network-level chrome: // requests for thumbnails and the history backend that serves these. -class DOMUIThumbnailSource : public ChromeURLDataManager::DataSource, - public NotificationObserver { +class DOMUIThumbnailSource : public ChromeURLDataManager::DataSource { public: explicit DOMUIThumbnailSource(Profile* profile); @@ -44,14 +43,6 @@ class DOMUIThumbnailSource : public ChromeURLDataManager::DataSource, private: ~DOMUIThumbnailSource() {} - // NotificationObserver implementation - virtual void Observe(NotificationType type, - const NotificationSource& source, - const NotificationDetails& details); - - // Fetch the specified resource. - void DoDataRequest(const std::string& path, int request_id); - // Send the default thumbnail when we are missing a real one. void SendDefaultThumbnail(int request_id); |