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

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

Issue 471673002: Omnibox: Prevent Asynchronous Suggestions from Changing Default Match (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add clarifying comment Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 class contains common functionality for search-based autocomplete 5 // This class contains common functionality for search-based autocomplete
6 // providers. Search provider and zero suggest provider both use it for common 6 // providers. Search provider and zero suggest provider both use it for common
7 // functionality. 7 // functionality.
8 8
9 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 9 #ifndef CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
10 #define CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 10 #define CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const = 0; 212 virtual const TemplateURL* GetTemplateURL(bool is_keyword) const = 0;
213 213
214 // Returns the AutocompleteInput for keyword provider or default provider 214 // Returns the AutocompleteInput for keyword provider or default provider
215 // based on the value of |is_keyword|. 215 // based on the value of |is_keyword|.
216 virtual const AutocompleteInput GetInput(bool is_keyword) const = 0; 216 virtual const AutocompleteInput GetInput(bool is_keyword) const = 0;
217 217
218 // Returns a pointer to a Results object, which will hold suggest results. 218 // Returns a pointer to a Results object, which will hold suggest results.
219 virtual SearchSuggestionParser::Results* GetResultsToFill( 219 virtual SearchSuggestionParser::Results* GetResultsToFill(
220 bool is_keyword) = 0; 220 bool is_keyword) = 0;
221 221
222 // Optional. Called after a successful call to ParseSuggestResults(), this
223 // function provides the opportunity to do post-processing on the received
msw 2014/08/14 02:57:22 nit: s/provides the opportunity to do/allows/
Mark P 2014/08/15 00:05:56 Removed this function. Now obsolete.
224 // results.
225 virtual void HandleReceivedResults(bool is_keyword);
msw 2014/08/14 02:57:22 optional nit: OnParseSuggestResults, OnSuggestResu
Mark P 2014/08/15 00:05:56 Now obsolete.
226
222 // Returns whether the destination URL corresponding to the given |result| 227 // Returns whether the destination URL corresponding to the given |result|
223 // should contain command-line-specified query params. 228 // should contain command-line-specified query params.
224 virtual bool ShouldAppendExtraParams( 229 virtual bool ShouldAppendExtraParams(
225 const SearchSuggestionParser::SuggestResult& result) const = 0; 230 const SearchSuggestionParser::SuggestResult& result) const = 0;
226 231
227 // Stops the suggest query. 232 // Stops the suggest query.
228 // NOTE: This does not update |done_|. Callers must do so. 233 // NOTE: This does not update |done_|. Callers must do so.
229 virtual void StopSuggest() = 0; 234 virtual void StopSuggest() = 0;
230 235
231 // Clears the current results. 236 // Clears the current results.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 288
284 // Each deletion handler in this vector corresponds to an outstanding request 289 // Each deletion handler in this vector corresponds to an outstanding request
285 // that a server delete a personalized suggestion. Making this a ScopedVector 290 // that a server delete a personalized suggestion. Making this a ScopedVector
286 // causes us to auto-cancel all such requests on shutdown. 291 // causes us to auto-cancel all such requests on shutdown.
287 SuggestionDeletionHandlers deletion_handlers_; 292 SuggestionDeletionHandlers deletion_handlers_;
288 293
289 DISALLOW_COPY_AND_ASSIGN(BaseSearchProvider); 294 DISALLOW_COPY_AND_ASSIGN(BaseSearchProvider);
290 }; 295 };
291 296
292 #endif // CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_ 297 #endif // CHROME_BROWSER_AUTOCOMPLETE_BASE_SEARCH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698