summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 10:17:56 +0000
committermpearson@chromium.org <mpearson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-25 10:17:56 +0000
commitc5e122b7e84d35ed037edcc543bc19e9e1a12ba9 (patch)
treefac1689517672770b7a8eedf6fbf441755016451
parenta4780c63799e6a52464608f1b608e0aed570e6bf (diff)
downloadchromium_src-c5e122b7e84d35ed037edcc543bc19e9e1a12ba9.zip
chromium_src-c5e122b7e84d35ed037edcc543bc19e9e1a12ba9.tar.gz
chromium_src-c5e122b7e84d35ed037edcc543bc19e9e1a12ba9.tar.bz2
Omnibox HUP: Comment Cleanup
Following suggestions from https://codereview.chromium.org/347963002/ BUG=380357 Review URL: https://codereview.chromium.org/349183004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279664 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc4
-rw-r--r--chrome/browser/autocomplete/history_url_provider.h15
-rw-r--r--chrome/browser/omnibox/omnibox_field_trial.h9
3 files changed, 11 insertions, 17 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index e1320f6..9c33da6 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -767,8 +767,8 @@ void HistoryURLProvider::DoAutocomplete(history::HistoryBackend* backend,
SortAndDedupMatches(&params->matches);
// Try to create a shorter suggestion from the best match.
- // We consider the what you typed match to be eligible to be displayed when
- // there's a reasonable chance the user actually cares:
+ // We consider the what you typed match eligible for display when there's a
+ // reasonable chance the user actually cares:
// * Their input can be opened as a URL, and
// * We parsed the input as a URL, or it starts with an explicit "http:" or
// "https:".
diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h
index e127728..fcbd8c5 100644
--- a/chrome/browser/autocomplete/history_url_provider.h
+++ b/chrome/browser/autocomplete/history_url_provider.h
@@ -156,10 +156,9 @@ struct HistoryURLProviderParams {
// this to. See comments in DoAutocomplete().
PromoteType promote_type;
- // True if we should consider adding the what you typed match. This
- // decision is often already summarized in |promote_type| by whether it
- // says to promote the what you typed match. As such, this variable is
- // only useful when |promote_type| is FRONT_HISTORY_MATCH.
+ // True if |what_you_typed_match| is eligible for display. If this is true,
+ // PromoteMatchesIfNecessary() may choose to place |what_you_typed_match| on
+ // |matches_| even when |promote_type| is not WHAT_YOU_TYPED_MATCH.
bool have_what_you_typed_match;
// Languages we should pass to gfx::GetCleanStringFromUrl.
@@ -249,11 +248,9 @@ class HistoryURLProvider : public HistoryProvider {
history::URLDatabase* db,
HistoryURLProviderParams* params);
- // May promote either the what you typed match or first history match in
- // params->matches to the front of |matches_|, depending on the value of
- // params->promote_type. Also, depending on a field trial state, if it
- // promotes the first history match, it may decide to append the what you
- // typed matche immediately after.
+ // May promote the what you typed match, the first history match in
+ // parmas->matches, or both to the front of |matches_|, depending on the
+ // values of params->promote_type and params->have_what_you_typed_match.
void PromoteMatchesIfNecessary(const HistoryURLProviderParams& params);
// Dispatches the results to the autocomplete controller. Called on the
diff --git a/chrome/browser/omnibox/omnibox_field_trial.h b/chrome/browser/omnibox/omnibox_field_trial.h
index 7a5e383..fafd818 100644
--- a/chrome/browser/omnibox/omnibox_field_trial.h
+++ b/chrome/browser/omnibox/omnibox_field_trial.h
@@ -304,12 +304,9 @@ class OmniboxFieldTrial {
// autocompletions to offer. Normally HistoryURL does not add the UWYT match
// if there are good inline autocompletions, as the user could simply hit
// backspace to delete the completion and get the what-you-typed match.
- // However, in the disable inlining experiment this interaction is a lot more
- // difficult. The user will have to select a not-inlined suggestion and
- // backspace (possibly a lot) to get back to the what-you-typed match.
- // This mode is intended to alleviate the pain by always ensuring that
- // the UWYT match appears somewhere on the list of suggestions. Returns
- // false if the experiment isn't active.
+ // However, for the disabling inlining experiment we want to have the UWYT
+ // always explicitly displayed at an option if possible. Returns false if
+ // the experiment isn't active.
static bool AddUWYTMatchEvenIfPromotedURLs();
// ---------------------------------------------------------