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

Unified Diff: chrome/browser/search/suggestions/suggestions_service.h

Issue 299713007: [Suggestions] Adding a Thumbnail Manager for the Suggestions Service (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed C++11 statement Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/suggestions/suggestions_service.h
diff --git a/chrome/browser/search/suggestions/suggestions_service.h b/chrome/browser/search/suggestions/suggestions_service.h
index 972cfce63ada136e3d84343cdcf43cd140f1c4e4..dd1976af71a1271b2007604067ebdb6c89e6afaa 100644
--- a/chrome/browser/search/suggestions/suggestions_service.h
+++ b/chrome/browser/search/suggestions/suggestions_service.h
@@ -13,6 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/search/suggestions/proto/suggestions.pb.h"
+#include "chrome/browser/search/suggestions/thumbnail_manager.h"
huangs 2014/05/23 17:23:35 thumbnail_manager.h is included solely for typede
Mathieu 2014/05/23 19:21:58 Removed the typedef..
#include "components/keyed_service/core/keyed_service.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
@@ -43,6 +44,11 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// fetch request completes.
void FetchSuggestionsData(ResponseCallback callback);
+ // Retrieves stored thumbnail for website |url| asynchronously. Returns
Jered 2014/05/23 16:57:48 s/Returns (.*) to/Calls |callback| with/
Mathieu 2014/05/23 19:21:58 Done.
+ // thumbnail image as a Bitmap pointer to |callback| if found, and NULL
+ // otherwise.
+ void GetPageThumbnail(const GURL& url, BitmapResponseCallback callback);
+
private:
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData);
@@ -68,6 +74,9 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// Queue of callbacks. These are flushed when fetch request completes.
std::vector<ResponseCallback> waiting_requestors_;
+ // Used to obtain server thumbnails, if available.
+ scoped_ptr<ThumbnailManager> thumbnail_manager_;
+
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(SuggestionsService);

Powered by Google App Engine
This is Rietveld 408576698