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

Unified Diff: chrome/browser/android/omnibox/answers_image_bridge.cc

Issue 341083008: [AiS] Fix ownership issue for image service observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@img-bridge
Patch Set: Re-upload. Created 6 years, 6 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 | « no previous file | chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/omnibox/answers_image_bridge.cc
diff --git a/chrome/browser/android/omnibox/answers_image_bridge.cc b/chrome/browser/android/omnibox/answers_image_bridge.cc
index 5ed9028137943592b43e1ab9e17467447c736f9d..6d19d7c7955c3af7e34f8d423774543db8e24789 100644
--- a/chrome/browser/android/omnibox/answers_image_bridge.cc
+++ b/chrome/browser/android/omnibox/answers_image_bridge.cc
@@ -36,11 +36,7 @@ class AnswersImageObserverAndroid : public BitmapFetcherService::Observer {
// AnswersImageObserver:
virtual void OnImageChanged(BitmapFetcherService::RequestId request_id,
const SkBitmap& answers_image) OVERRIDE {
- // An empty image signals a completed request.
- if (answers_image.empty()) {
- delete this;
- return;
- }
+ DCHECK(!answers_image.empty());
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jobject> java_bitmap =
« no previous file with comments | « no previous file | chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698