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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java

Issue 1217893013: Don't preload rarely seen large images (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: spacing Created 5 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
Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java
index 16b59d23b46e18d6523e5d924779c765240fe98e..53c3e04cee2bbd6ef831e5ef42769493d293fca4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/resources/StaticResourcePreloads.java
@@ -25,8 +25,8 @@ public class StaticResourcePreloads {
};
/** A list of resources to load asynchronously once the compositor is initialized. */
- private static int[] sAsynchronousResources = new int[] {R.drawable.logo_card_back,
- R.drawable.btn_tabstrip_switch_normal, R.drawable.btn_tabstrip_switch_incognito};
+ private static int[] sAsynchronousResources = new int[] {
+ R.drawable.btn_tabstrip_switch_normal, R.drawable.btn_tabstrip_switch_incognito};
private static int[] sEmptyList = new int[] {};
@@ -35,7 +35,7 @@ public class StaticResourcePreloads {
}
@SuppressFBWarnings("MS_EXPOSE_REP")
- public static int[] getAsynchronousResources() {
- return sAsynchronousResources;
+ public static int[] getAsynchronousResources(Context context) {
+ return DeviceFormFactor.isTablet(context) ? sAsynchronousResources : sEmptyList;
}
}

Powered by Google App Engine
This is Rietveld 408576698