Commit 33ed90e0 authored by mpearson@chromium.org's avatar mpearson@chromium.org

Omnibox Metrics: Make |completed_length| field sane

Have no qualms about fixing the definition of this broken field.  (No
need to deprecate the field and create a new one.)

See bug link for details.

The internal proto change has been submitted.

TBR=pkasting

BUG=381650

Review URL: https://codereview.chromium.org/314113009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275651 0039d316-1c4b-4281-b951-d872f2087c98
parent bdf5f2d2
......@@ -73,8 +73,10 @@ struct OmniboxLog {
base::TimeDelta elapsed_time_since_user_first_modified_omnibox;
// The number of extra characters the user would have to manually type
// if she/he were not given the opportunity to select this match. Set to
// base::string16::npos if not available.
// if she/he were not given the opportunity to select this match. Only
// set for matches that are allowed to be the default match (i.e., are
// inlineable). Set to base::string16::npos if the match is not allowed
// to be the default match.
size_t completed_length;
// The amount of time since the last time the default (i.e., inline)
......
......@@ -756,7 +756,8 @@ void OmniboxEditModel::OpenMatch(AutocompleteMatch match,
-1, // don't yet know tab ID; set later if appropriate
ClassifyPage(),
elapsed_time_since_user_first_modified_omnibox,
match.inline_autocompletion.length(),
match.allowed_to_be_default_match ? match.inline_autocompletion.length() :
base::string16::npos,
elapsed_time_since_last_change_to_default_match,
(!popup_model()->IsOpen() || !pasted_text.empty()) ?
fake_single_entry_result : result());
......
......@@ -55,8 +55,10 @@ message OmniboxEventProto {
// The length of the inline autocomplete text in the omnibox.
// The sum |typed_length| + |completed_length| gives the full length of the
// user-visible text in the omnibox.
// This field is only set for inlineable suggestions selected at position 0
// (|selected_index| = 0) and will be omitted otherwise.
// This field is only set for suggestions that are allowed to be the default
// match and omitted otherwise. The first suggestion is always allowed to
// be the default match. (This is an enforced constraint.) Hence, if
// |selected_index| == 0, then this field will always be set.
optional int32 completed_length = 6;
// The amount of time, in milliseconds, since the user first began modifying
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment