Bug 1277854 - Post: add comment explaining local loading r=sebastian
authorAndrzej Hunt <ahunt@mozilla.com>
Fri, 03 Jun 2016 10:51:18 -0700
changeset 341383 2086e849a7e6f30fc56100f04847143d6e575ea2
parent 341382 367c7cce892f627ad7e1f1ceba0f04feb601522a
child 341384 1a72dc1810bc0170754b9fbf14a79e7f855346df
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1277854
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277854 - Post: add comment explaining local loading r=sebastian MozReview-Commit-ID: J8eJrzkExeX
mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
+++ b/mobile/android/base/java/org/mozilla/gecko/favicons/Favicons.java
@@ -301,18 +301,20 @@ public class Favicons {
             final Bitmap result = getSizedFaviconFromCache(targetURL, targetSize);
             if (result != null) {
                 // Victory - immediate response!
                 return dispatchResult(pageURL, targetURL, result, callback);
             }
         }
 
         // No joy using in-memory resources. Go to background thread and ask the database.
+        // Note: this is a near duplicate of loadUncachedFavicon, however loadUncachedFavicon
+        // can download favicons, whereas we want to restrict ourselves to the cache.
         final LoadFaviconTask task =
-            new LoadFaviconTask(context, pageURL, targetURL, 0, callback, targetSize, true);
+            new LoadFaviconTask(context, pageURL, targetURL, 0, callback, targetSize, /* onlyFromLocal: */ true);
         final int taskId = task.getId();
         synchronized (loadTasks) {
             loadTasks.put(taskId, task);
         }
         task.execute();
 
         return taskId;
     }