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

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: Fix iOS build errors. 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
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..376f774c08b82c45c7b3d7f015c5c02d77e6c751 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
Marc Treib 2016/05/13 15:53:59 nitty nit: style guide says two spaces before comm
markusheintz_ 2016/05/17 13:08:22 Done.
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_++;

Powered by Google App Engine
This is Rietveld 408576698