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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 496733005: Some favicon cleanup/upstreaming (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 6 years, 4 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/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 0e40ea06c81f9cf24afb65a8a8f3d6a1f696f03b..9c228e52bd3a473f50d353433e4bedcdd7c9519a 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -603,8 +603,8 @@ ScopedJavaLocalRef<jobject> TabAndroid::GetFavicon(JNIEnv* env, jobject obj) {
if (!favicon_tab_helper)
return bitmap;
- if (!favicon_tab_helper->FaviconIsValid())
- return bitmap;
+
+ // If the favicon isn't valid, it will return a default bitmap.
SkBitmap favicon =
favicon_tab_helper->GetFavicon()
@@ -635,6 +635,11 @@ ScopedJavaLocalRef<jobject> TabAndroid::GetFavicon(JNIEnv* env, jobject obj) {
return bitmap;
}
+jboolean TabAndroid::IsFaviconValid(JNIEnv* env, jobject jobj) {
+ return web_contents() &&
+ FaviconTabHelper::FromWebContents(web_contents())->FaviconIsValid();
+}
+
prerender::PrerenderManager* TabAndroid::GetPrerenderManager() const {
Profile* profile = GetProfile();
if (!profile)

Powered by Google App Engine
This is Rietveld 408576698