void RegisterDisplayedAnswers(const AutocompleteResult& result);
// AutocompleteProvider:
- virtual void ResetSession() OVERRIDE;
+ void ResetSession() override;
// This URL may be sent with suggest requests; see comments on CanSendURL().
void set_current_page_url(const GURL& current_page_url) {
}
protected:
- virtual ~SearchProvider();
+ ~SearchProvider() override;
private:
friend class SearchProviderTest;
static ACMatches::iterator FindTopMatch(ACMatches* matches);
// AutocompleteProvider:
- virtual void Start(const AutocompleteInput& input,
- bool minimal_changes) OVERRIDE;
- virtual void Stop(bool clear_cached_results) OVERRIDE;
+ void Start(const AutocompleteInput& input, bool minimal_changes) override;
+ void Stop(bool clear_cached_results) override;
// BaseSearchProvider:
- virtual const TemplateURL* GetTemplateURL(bool is_keyword) const OVERRIDE;
- virtual const AutocompleteInput GetInput(bool is_keyword) const OVERRIDE;
- virtual bool ShouldAppendExtraParams(
- const SearchSuggestionParser::SuggestResult& result) const OVERRIDE;
- virtual void RecordDeletionResult(bool success) OVERRIDE;
+ const TemplateURL* GetTemplateURL(bool is_keyword) const override;
+ const AutocompleteInput GetInput(bool is_keyword) const override;
+ bool ShouldAppendExtraParams(
+ const SearchSuggestionParser::SuggestResult& result) const override;
+ void RecordDeletionResult(bool success) override;
// net::URLFetcherDelegate:
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+ void OnURLFetchComplete(const net::URLFetcher* source) override;
// Stops the suggest query.
// NOTE: This does not update |done_|. Callers must do so.
// This does not update |done_|.
void DoHistoryQuery(bool minimal_changes);
+ // Returns the time to delay before sending the Suggest request.
+ base::TimeDelta GetSuggestQueryDelay() const;
+
// Determines whether an asynchronous subcomponent query should run for the
// current input. If so, starts it if necessary; otherwise stops it.
// NOTE: This function does not update |done_|. Callers must do so.
// AnswersQueryData.
AnswersQueryData FindAnswersPrefetchData();
- // The amount of time to wait before sending a new suggest request after the
- // previous one. Non-const because some unittests modify this value.
- static int kMinimumTimeBetweenSuggestQueriesMs;
-
AutocompleteProviderListener* listener_;
// The number of suggest results that haven't yet arrived. If it's greater