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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java

Issue 2692203005: Remove unused context in ChromePreferenceManager. (Closed)
Patch Set: Update new use Created 3 years, 10 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/ntp/cards/NewTabPageRecyclerView.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
index 5639eb2fb9ee79b21535ada23d196c87430e5a1a..2cf4333c0a08fc37b919ff0d25cff2a9ccb592a7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageRecyclerView.java
@@ -620,7 +620,7 @@ public class NewTabPageRecyclerView extends RecyclerView implements TouchDisable
if (computeVerticalScrollOffset() != 0) return;
// We only show the animation a certain number of times to a user.
- ChromePreferenceManager manager = ChromePreferenceManager.getInstance(getContext());
+ ChromePreferenceManager manager = ChromePreferenceManager.getInstance();
int animCount = manager.getNewTabPageFirstCardAnimationRunCount();
if (animCount > CardsVariationParameters.getFirstCardAnimationMaxRuns()) return;
manager.setNewTabPageFirstCardAnimationRunCount(animCount + 1);
@@ -645,7 +645,7 @@ public class NewTabPageRecyclerView extends RecyclerView implements TouchDisable
// for future runs.
if (!mFirstCardAnimationRun && !mCardImpressionAfterAnimationTracked) return;
- ChromePreferenceManager.getInstance(getContext()).setCardsImpressionAfterAnimation(true);
+ ChromePreferenceManager.getInstance().setCardsImpressionAfterAnimation(true);
mCardImpressionAfterAnimationTracked = true;
}

Powered by Google App Engine
This is Rietveld 408576698