Omnibox Logging - Clear Both Counterfactual Bits on ResetSession() Call
It's weird to have the triggered bit set while the triggered_in_session
bit is not set. This can happen in weird edge conditions. For example,
type something in tab A, type something else in tab B where this
something else triggers the field trial, switch back to tab A and
press enter to navigate without typing anything new. The switching tabs
will cause a ResetSession() call, clearing the triggered_in_session bit.
Yet the triggered bit does not get cleared; it only gets set/reset upon
user typing (i.e., a call to SearchProvider). Thus, we have this
inconsistency.
Really, conceptually if we send ResetSession() calls at the appropriate
times, it should clear all the bits.
BUG=593434
Review URL: https://codereview.chromium.org/1811123003
Cr-Commit-Position: refs/heads/master@{#382181}
diff --git a/components/omnibox/browser/search_provider.cc b/components/omnibox/browser/search_provider.cc
index 757ab64..465cd65 100644
--- a/components/omnibox/browser/search_provider.cc
+++ b/components/omnibox/browser/search_provider.cc
@@ -175,6 +175,7 @@
}
void SearchProvider::ResetSession() {
+ set_field_trial_triggered(false);
set_field_trial_triggered_in_session(false);
}