| OLD | NEW |
| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 static int CalculateRelevanceForKeywordVerbatim( | 156 static int CalculateRelevanceForKeywordVerbatim( |
| 157 metrics::OmniboxInputType::Type type, | 157 metrics::OmniboxInputType::Type type, |
| 158 bool prefer_keyword); | 158 bool prefer_keyword); |
| 159 | 159 |
| 160 // AutocompleteProvider: | 160 // AutocompleteProvider: |
| 161 virtual void Start(const AutocompleteInput& input, | 161 virtual void Start(const AutocompleteInput& input, |
| 162 bool minimal_changes) OVERRIDE; | 162 bool minimal_changes) OVERRIDE; |
| 163 | 163 |
| 164 // BaseSearchProvider: | 164 // BaseSearchProvider: |
| 165 virtual void SortResults(bool is_keyword, | 165 virtual void SortResults(bool is_keyword, |
| 166 bool relevances_from_server, | |
| 167 SearchSuggestionParser::Results* results) OVERRIDE; | 166 SearchSuggestionParser::Results* results) OVERRIDE; |
| 168 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const OVERRIDE; | 167 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const OVERRIDE; |
| 169 virtual const AutocompleteInput GetInput(bool is_keyword) const OVERRIDE; | 168 virtual const AutocompleteInput GetInput(bool is_keyword) const OVERRIDE; |
| 170 virtual SearchSuggestionParser::Results* GetResultsToFill( | 169 virtual SearchSuggestionParser::Results* GetResultsToFill( |
| 171 bool is_keyword) OVERRIDE; | 170 bool is_keyword) OVERRIDE; |
| 172 virtual bool ShouldAppendExtraParams( | 171 virtual bool ShouldAppendExtraParams( |
| 173 const SearchSuggestionParser::SuggestResult& result) const OVERRIDE; | 172 const SearchSuggestionParser::SuggestResult& result) const OVERRIDE; |
| 174 virtual void StopSuggest() OVERRIDE; | 173 virtual void StopSuggest() OVERRIDE; |
| 175 virtual void ClearAllResults() OVERRIDE; | 174 virtual void ClearAllResults() OVERRIDE; |
| 176 virtual int GetDefaultResultRelevance() const OVERRIDE; | 175 virtual int GetDefaultResultRelevance() const OVERRIDE; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 base::TimeTicks token_expiration_time_; | 340 base::TimeTicks token_expiration_time_; |
| 342 | 341 |
| 343 // Answers prefetch management. | 342 // Answers prefetch management. |
| 344 AnswersQueryData prefetch_data_; // Data to use for query prefetching. | 343 AnswersQueryData prefetch_data_; // Data to use for query prefetching. |
| 345 AnswersQueryData last_answer_seen_; // Last answer seen. | 344 AnswersQueryData last_answer_seen_; // Last answer seen. |
| 346 | 345 |
| 347 DISALLOW_COPY_AND_ASSIGN(SearchProvider); | 346 DISALLOW_COPY_AND_ASSIGN(SearchProvider); |
| 348 }; | 347 }; |
| 349 | 348 |
| 350 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ | 349 #endif // CHROME_BROWSER_AUTOCOMPLETE_SEARCH_PROVIDER_H_ |
| OLD | NEW |