| 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..f74c4cbadf2b27d5b7c7a84129c659b2d7eca7aa 100644
|
| --- a/chrome/browser/search/suggestions/suggestions_service.h
|
| +++ b/chrome/browser/search/suggestions/suggestions_service.h
|
| @@ -13,8 +13,10 @@
|
| #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"
|
| #include "components/keyed_service/core/keyed_service.h"
|
| #include "net/url_request/url_fetcher_delegate.h"
|
| +#include "ui/gfx/image/image_skia.h"
|
| #include "url/gurl.h"
|
|
|
| class Profile;
|
| @@ -43,6 +45,12 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
|
| // fetch request completes.
|
| void FetchSuggestionsData(ResponseCallback callback);
|
|
|
| + // Retrieves stored thumbnail for website |url| asynchronously. Calls
|
| + // |callback| with Bitmap pointer if found, and NULL otherwise.
|
| + void GetPageThumbnail(
|
| + const GURL& url,
|
| + base::Callback<void(const GURL&, const SkBitmap*)> callback);
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData);
|
|
|
| @@ -68,6 +76,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);
|
|
|