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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java

Issue 1517883003: [Contextual Search] Reset all counters to fix flaky tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@4t
Patch Set: Fixed a nit comment. Created 4 years, 11 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/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java
index bd2ec02481f859c8cd6d1de6357e0f3e1813ca5a..3e52aa6f2fc4918a2cea7ff8dd544906286440ad 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchPolicy.java
@@ -41,7 +41,6 @@ class ContextualSearchPolicy {
// Members used only for testing purposes.
private boolean mDidOverrideDecidedStateForTesting;
private boolean mDecidedStateForTesting;
- private boolean mDidResetCounters;
private Integer mTapTriggeredPromoLimitForTesting;
private Integer mTapResolveLimitForDecided;
private Integer mTapPrefetchLimitForDecided;
@@ -388,17 +387,6 @@ class ContextualSearchPolicy {
// --------------------------------------------------------------------------------------------
/**
- * Resets all policy counters.
- */
- @VisibleForTesting
- void resetCounters() {
- updateCountersForOpen();
-
- mPreferenceManager.setContextualSearchPromoOpenCount(0);
- mDidResetCounters = true;
- }
-
- /**
* Overrides the decided/undecided state for the user preference.
* @param decidedState Whether the user has decided or not.
*/
@@ -409,14 +397,6 @@ class ContextualSearchPolicy {
}
/**
- * @return Whether counters have been reset yet (by resetCounters) or not.
- */
- @VisibleForTesting
- boolean didResetCounters() {
- return mDidResetCounters;
- }
-
- /**
* @return count of times the panel with the promo has been opened.
*/
@VisibleForTesting
@@ -432,6 +412,10 @@ class ContextualSearchPolicy {
return mPreferenceManager.getContextualSearchTapCount();
}
+ // --------------------------------------------------------------------------------------------
+ // Translation support.
+ // --------------------------------------------------------------------------------------------
+
/**
* Determines whether translation is needed between the given languages.
* @param sourceLanguage The source language code; language we're translating from.
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698