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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.cc

Issue 11316057: Omnibox: Log Elapsed Time Since Last Time The Default Match Changed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/browser/ui/omnibox/omnibox_edit_model.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
index 188611d51c8d59bf58b73013b81d2d9bb9549725..f5ae42936c8d0a48c40880813d905139ac2b2f8c 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc
@@ -552,12 +552,19 @@ void OmniboxEditModel::OpenMatch(const AutocompleteMatch& match,
web_contents()->GetURL()),
base::TimeTicks::Now() - time_user_first_modified_omnibox_,
string16::npos, // inline autocomplete length; possibly set later
+ base::TimeTicks::Now() -
Bart N. 2012/11/19 18:02:21 There is some inconsistency here, because you call
Mark P 2012/11/19 22:21:45 I was wondering if someone would call me out on th
+ autocomplete_controller_->last_time_default_match_changed(),
result());
DCHECK(user_input_in_progress_ ||
match.provider->type() == AutocompleteProvider::TYPE_ZERO_SUGGEST)
<< "We didn't get here through the expected series of calls. "
<< "time_user_first_modified_omnibox_ is not set correctly and other "
<< "things may be wrong. Match provider: " << match.provider->GetName();
+ DCHECK(log.elapsed_time_since_user_first_modified_omnibox >=
Peter Kasting 2012/11/16 23:57:18 Nit: DCHECK_GE
Mark P 2012/11/19 22:21:45 Can't use a DCHECK_GE because DCHECK using << to d
+ log.elapsed_time_since_last_change_to_default_match)
+ << "We should've got the notification that the user modified the "
+ << "omnibox text at same time or before the most recent time the "
+ << "default match changed.";
if (index != OmniboxPopupModel::kNoMatch)
log.selected_index = index;
else if (!has_temporary_text_)

Powered by Google App Engine
This is Rietveld 408576698