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

Side by Side Diff: components/omnibox/search_provider.h

Issue 836213002: Assume all providers may give zero suggest responses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A style fix Created 5 years, 11 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
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool prefer_keyword); 151 bool prefer_keyword);
152 152
153 // A helper function for UpdateAllOldResults(). 153 // A helper function for UpdateAllOldResults().
154 static void UpdateOldResults(bool minimal_changes, 154 static void UpdateOldResults(bool minimal_changes,
155 SearchSuggestionParser::Results* results); 155 SearchSuggestionParser::Results* results);
156 156
157 // Returns the first match in |matches| which might be chosen as default. 157 // Returns the first match in |matches| which might be chosen as default.
158 static ACMatches::iterator FindTopMatch(ACMatches* matches); 158 static ACMatches::iterator FindTopMatch(ACMatches* matches);
159 159
160 // AutocompleteProvider: 160 // AutocompleteProvider:
161 void Start(const AutocompleteInput& input, bool minimal_changes) override; 161 void Start(const AutocompleteInput& input,
162 bool minimal_changes,
163 bool on_focus) override;
162 void Stop(bool clear_cached_results) override; 164 void Stop(bool clear_cached_results) override;
163 165
164 // BaseSearchProvider: 166 // BaseSearchProvider:
165 const TemplateURL* GetTemplateURL(bool is_keyword) const override; 167 const TemplateURL* GetTemplateURL(bool is_keyword) const override;
166 const AutocompleteInput GetInput(bool is_keyword) const override; 168 const AutocompleteInput GetInput(bool is_keyword) const override;
167 bool ShouldAppendExtraParams( 169 bool ShouldAppendExtraParams(
168 const SearchSuggestionParser::SuggestResult& result) const override; 170 const SearchSuggestionParser::SuggestResult& result) const override;
169 void RecordDeletionResult(bool success) override; 171 void RecordDeletionResult(bool success) override;
170 172
171 // net::URLFetcherDelegate: 173 // net::URLFetcherDelegate:
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 base::TimeTicks token_expiration_time_; 396 base::TimeTicks token_expiration_time_;
395 397
396 // Answers prefetch management. 398 // Answers prefetch management.
397 AnswersCache answers_cache_; // Cache for last answers seen. 399 AnswersCache answers_cache_; // Cache for last answers seen.
398 AnswersQueryData prefetch_data_; // Data to use for query prefetching. 400 AnswersQueryData prefetch_data_; // Data to use for query prefetching.
399 401
400 DISALLOW_COPY_AND_ASSIGN(SearchProvider); 402 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
401 }; 403 };
402 404
403 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_ 405 #endif // COMPONENTS_OMNIBOX_SEARCH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698