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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java

Issue 1103163004: [Contextual Search] Remove opt-in code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync & rebase (based of Fix Promo Logging CL) Created 5 years, 8 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/bottombar/contextualsearch/ContextualSearchPanel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
index d6b0b12befc22e3975648a3aea09878b798a3107..5aee296c1165e017a499135d0f2078757dc267b2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java
@@ -23,7 +23,6 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
UNDEFINED,
CLOSED,
PEEKED,
- PROMO,
EXPANDED,
MAXIMIZED;
}
@@ -146,7 +145,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
}
@Override
- protected boolean isPanelPromoAvailable() {
+ protected boolean isPromoAvailable() {
return mManagementDelegate != null && mManagementDelegate.isOptOutPromoAvailable();
}
@@ -236,19 +235,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
if (mManagementDelegate.isRunningInCompatibilityMode()) {
mManagementDelegate.openResolvedSearchUrlInNewTab();
} else {
- // NOTE(pedrosimonetti): If the promo is active and getPromoContentHeight()
- // returns -1 that means that the promo page hasn't finished loading, and
- // therefore it wasn't possible to calculate the height of the promo contents.
- // This will only happen if the user taps on a word that will trigger the
- // promo, and then quickly taps on the peeking bar, before the promo page
- // (which is local) finishes loading.
- //
- // TODO(pedrosimonetti): For now, we're simply ignoring the tap action in
- // that case. Consider implementing a better approach, where the Panel
- // would auto-expand once the height is calculated.
- if (!getIsPromoActive() || getPromoContentHeight() != -1) {
- expandPanel(StateChangeReason.SEARCH_BAR_TAP);
- }
+ expandPanel(StateChangeReason.SEARCH_BAR_TAP);
}
} else if (isExpanded()) {
peekPanel(StateChangeReason.SEARCH_BAR_TAP);
@@ -398,24 +385,6 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
}
@Override
- public void setPromoContentHeight(float height) {
- // NOTE(pedrosimonetti): exposing superclass method to the interface.
- super.setPromoContentHeight(height);
- }
-
- @Override
- public void setShouldHidePromoHeader(boolean shouldHidePromoHeader) {
- // NOTE(pedrosimonetti): exposing superclass method to the interface.
- super.setShouldHidePromoHeader(shouldHidePromoHeader);
- }
-
- @Override
- public void animateAfterFirstRunSuccess() {
- // NOTE(pedrosimonetti): exposing superclass method to the interface.
- super.animateAfterFirstRunSuccess();
- }
-
- @Override
public void onLoadStarted() {
setProgressBarCompletion(0);
setProgressBarVisible(true);
@@ -449,6 +418,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
@Override
public void setDidSearchInvolvePromo() {
+ // TODO(pedrosimonetti): DO NOT SUBMIT: use it or remove it!
// NOTE(pedrosimonetti): exposing superclass method to the interface.
super.setDidSearchInvolvePromo();
}
@@ -461,6 +431,7 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
@Override
public void setIsPromoActive(boolean shown) {
+ // TODO(pedrosimonetti): DO NOT SUBMIT: use it or remove it!
// NOTE(pedrosimonetti): exposing superclass method to the interface.
super.setIsPromoActive(shown);
}

Powered by Google App Engine
This is Rietveld 408576698