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

Side by Side Diff: chrome/browser/autocomplete/zero_suggest_provider.cc

Issue 18878007: Omnibox: Make the Controller Reorder Matches for Inlining (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autocomplete/zero_suggest_provider.h" 5 #include "chrome/browser/autocomplete/zero_suggest_provider.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/i18n/case_conversion.h" 8 #include "base/i18n/case_conversion.h"
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 457
458 AutocompleteMatch ZeroSuggestProvider::MatchForCurrentURL() { 458 AutocompleteMatch ZeroSuggestProvider::MatchForCurrentURL() {
459 AutocompleteInput input(permanent_text_, string16::npos, string16(), 459 AutocompleteInput input(permanent_text_, string16::npos, string16(),
460 GURL(current_query_), current_page_classification_, 460 GURL(current_query_), current_page_classification_,
461 false, false, true, AutocompleteInput::ALL_MATCHES); 461 false, false, true, AutocompleteInput::ALL_MATCHES);
462 462
463 AutocompleteMatch match( 463 AutocompleteMatch match(
464 HistoryURLProvider::SuggestExactInput(this, input, 464 HistoryURLProvider::SuggestExactInput(this, input,
465 !HasHTTPScheme(input.text()))); 465 !HasHTTPScheme(input.text())));
466 match.is_history_what_you_typed_match = false; 466 match.is_history_what_you_typed_match = false;
467 match.allowed_to_be_default_match = true;
467 468
468 // The placeholder suggestion for the current URL has high relevance so 469 // The placeholder suggestion for the current URL has high relevance so
469 // that it is in the first suggestion slot and inline autocompleted. It 470 // that it is in the first suggestion slot and inline autocompleted. It
470 // gets dropped as soon as the user types something. 471 // gets dropped as soon as the user types something.
471 match.relevance = verbatim_relevance_; 472 match.relevance = verbatim_relevance_;
472 473
473 return match; 474 return match;
474 } 475 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/shortcuts_provider_unittest.cc ('k') | chrome/browser/omnibox/omnibox_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698