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

Unified Diff: chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc

Issue 1974013002: Replace SkBitmap with gfx::Image in the ImageFetcher API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync again Created 4 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
« no previous file with comments | « chrome/browser/search/suggestions/image_fetcher_impl.cc ('k') | chrome/browser/search/thumbnail_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
diff --git a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
index c78ed727e29e4e517b9056aa4cf191437649373d..159c18d8a20da20e81f76b06995f2fc08d459f4f 100644
--- a/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
+++ b/chrome/browser/search/suggestions/image_fetcher_impl_browsertest.cc
@@ -16,6 +16,7 @@
#include "components/image_fetcher/image_fetcher_delegate.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/image/image.h"
#include "url/gurl.h"
class SkBitmap;
@@ -42,8 +43,8 @@ class TestImageFetcherDelegate : public ImageFetcherDelegate {
~TestImageFetcherDelegate() override{};
// Perform additional tasks when an image has been fetched.
- void OnImageFetched(const GURL& url, const SkBitmap* bitmap) override {
- if (bitmap) {
+ void OnImageFetched(const GURL& url, const gfx::Image& image) override {
+ if (!image.IsEmpty()) {
num_delegate_valid_called_++;
} else {
num_delegate_null_called_++;
@@ -58,7 +59,7 @@ class TestImageFetcherDelegate : public ImageFetcherDelegate {
int num_delegate_null_called_;
};
-} // end namespace
+} // namespace
class ImageFetcherImplBrowserTest : public InProcessBrowserTest {
protected:
@@ -81,8 +82,8 @@ class ImageFetcherImplBrowserTest : public InProcessBrowserTest {
void OnImageAvailable(base::RunLoop* loop,
const GURL& url,
- const SkBitmap* bitmap) {
- if (bitmap) {
+ const gfx::Image& image) {
+ if (!image.IsEmpty()) {
num_callback_valid_called_++;
} else {
num_callback_null_called_++;
« no previous file with comments | « chrome/browser/search/suggestions/image_fetcher_impl.cc ('k') | chrome/browser/search/thumbnail_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698