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

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

Issue 1415963003: [Contextual Search] Fix history removal regression. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2526
Patch Set: Created 5 years, 2 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/contextualsearch/ContextualSearchManager.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/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 85c18a956e73a5b4052d4e7101fa420ceba2632f..8ced0dccc67037e6a94cb1392c3721e7bc71dbe2 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
@@ -277,8 +277,11 @@ public class ContextualSearchPanel extends ContextualSearchPanelAnimation
@Override
protected void onClosed(StateChangeReason reason) {
- destroy();
+ // Must be called before destroying Content because unseen visits should be removed from
+ // history, and if the Content gets destroyed there won't be a ContentViewCore to do that.
mManagementDelegate.onCloseContextualSearch(reason);
+
+ destroy();
}
// ============================================================================================
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698