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

Side by Side Diff: chrome/browser/autocomplete/search_provider.h

Issue 343523003: Remove AutocompleteInput Type and PageClassification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 // This file contains the Search autocomplete provider. This provider is 5 // This file contains the Search autocomplete provider. This provider is
6 // responsible for all autocomplete entries that start with "Search <engine> 6 // responsible for all autocomplete entries that start with "Search <engine>
7 // for ...", including searching for the current input string, search 7 // for ...", including searching for the current input string, search
8 // history, and search suggestions. An instance of it gets created and 8 // history, and search suggestions. An instance of it gets created and
9 // managed by the autocomplete controller. 9 // managed by the autocomplete controller.
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 SuggestResults* suggest_results, 131 SuggestResults* suggest_results,
132 NavigationResults* navigation_results); 132 NavigationResults* navigation_results);
133 133
134 // Recalculates the match contents class of |results| to better display 134 // Recalculates the match contents class of |results| to better display
135 // against the current input and user's language. 135 // against the current input and user's language.
136 void UpdateMatchContentsClass(const base::string16& input_text, 136 void UpdateMatchContentsClass(const base::string16& input_text,
137 Results* results); 137 Results* results);
138 138
139 // Calculates the relevance score for the keyword verbatim result (if the 139 // Calculates the relevance score for the keyword verbatim result (if the
140 // input matches one of the profile's keyword). 140 // input matches one of the profile's keyword).
141 static int CalculateRelevanceForKeywordVerbatim(AutocompleteInput::Type type, 141 static int CalculateRelevanceForKeywordVerbatim(
142 bool prefer_keyword); 142 metrics::OmniboxInputType::Type type,
143 bool prefer_keyword);
143 144
144 // AutocompleteProvider: 145 // AutocompleteProvider:
145 virtual void Start(const AutocompleteInput& input, 146 virtual void Start(const AutocompleteInput& input,
146 bool minimal_changes) OVERRIDE; 147 bool minimal_changes) OVERRIDE;
147 148
148 // BaseSearchProvider: 149 // BaseSearchProvider:
149 virtual void SortResults(bool is_keyword, 150 virtual void SortResults(bool is_keyword,
150 const base::ListValue* relevances, 151 const base::ListValue* relevances,
151 Results* results) OVERRIDE; 152 Results* results) OVERRIDE;
152 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const OVERRIDE; 153 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const OVERRIDE;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 GURL current_page_url_; 312 GURL current_page_url_;
312 313
313 // Session token management. 314 // Session token management.
314 std::string current_token_; 315 std::string current_token_;
315 base::TimeTicks token_expiration_time_; 316 base::TimeTicks token_expiration_time_;
316 317
317 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 318 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
318 }; 319 };
319 320
320 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ 321 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider_unittest.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698