| Index: chrome/browser/search/suggestions/suggestions_ui.cc
|
| diff --git a/chrome/browser/search/suggestions/suggestions_ui.cc b/chrome/browser/search/suggestions/suggestions_ui.cc
|
| index de84dc44fc487998a1c0f7f139c57dd05f48b23e..9bd73d50239a163ca4b8ed95e08347f4ad598aeb 100644
|
| --- a/chrome/browser/search/suggestions/suggestions_ui.cc
|
| +++ b/chrome/browser/search/suggestions/suggestions_ui.cc
|
| @@ -28,6 +28,7 @@
|
| #include "net/base/escape.h"
|
| #include "ui/base/l10n/time_format.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
| +#include "ui/gfx/image/image.h"
|
| #include "ui/gfx/image/image_skia.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -145,7 +146,7 @@ class SuggestionsSource : public content::URLDataSource {
|
|
|
| // Callback for responses from each Thumbnail request.
|
| void OnThumbnailAvailable(RequestContext* context, base::Closure barrier,
|
| - const GURL& url, const SkBitmap* bitmap);
|
| + const GURL& url, const gfx::Image& image);
|
|
|
| // Callback for when all requests are complete. Renders the output webpage and
|
| // passes the result to the original caller.
|
| @@ -249,10 +250,10 @@ void SuggestionsSource::OnThumbnailsFetched(RequestContext* context) {
|
| void SuggestionsSource::OnThumbnailAvailable(RequestContext* context,
|
| base::Closure barrier,
|
| const GURL& url,
|
| - const SkBitmap* bitmap) {
|
| - if (bitmap) {
|
| + const gfx::Image& image) {
|
| + if (!image.IsEmpty()) {
|
| std::vector<unsigned char> output;
|
| - gfx::PNGCodec::EncodeBGRASkBitmap(*bitmap, false, &output);
|
| + gfx::PNGCodec::EncodeBGRASkBitmap(*image.ToSkBitmap(), false, &output);
|
|
|
| std::string encoded_output;
|
| base::Base64Encode(
|
|
|