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

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

Issue 14366009: Omnibox: Call Stop() on all Providers After Certain Amount of Time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove sentence Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // stats. 172 // stats.
173 void UpdateAssistedQueryStats(AutocompleteResult* result); 173 void UpdateAssistedQueryStats(AutocompleteResult* result);
174 174
175 // Calls AutocompleteControllerDelegate::OnResultChanged() and if done sends 175 // Calls AutocompleteControllerDelegate::OnResultChanged() and if done sends
176 // AUTOCOMPLETE_CONTROLLER_RESULT_READY. 176 // AUTOCOMPLETE_CONTROLLER_RESULT_READY.
177 void NotifyChanged(bool notify_default_match); 177 void NotifyChanged(bool notify_default_match);
178 178
179 // Updates |done_| to be accurate with respect to current providers' statuses. 179 // Updates |done_| to be accurate with respect to current providers' statuses.
180 void CheckIfDone(); 180 void CheckIfDone();
181 181
182 // Starts the expire timer. 182 // Starts |expire_timer_|.
183 void StartExpireTimer(); 183 void StartExpireTimer();
184 184
185 // Starts |stop_timer_|.
186 void StartStopTimer();
187
185 AutocompleteControllerDelegate* delegate_; 188 AutocompleteControllerDelegate* delegate_;
186 189
187 // A list of all providers. 190 // A list of all providers.
188 ACProviders providers_; 191 ACProviders providers_;
189 192
190 HistoryURLProvider* history_url_provider_; 193 HistoryURLProvider* history_url_provider_;
191 194
192 KeywordProvider* keyword_provider_; 195 KeywordProvider* keyword_provider_;
193 196
194 SearchProvider* search_provider_; 197 SearchProvider* search_provider_;
(...skipping 15 matching lines...) Expand all
210 // also be more recent than the last keystroke if there was an 213 // also be more recent than the last keystroke if there was an
211 // asynchronous provider that returned and changed the default 214 // asynchronous provider that returned and changed the default
212 // match. See UpdateResult() for details on when we consider a 215 // match. See UpdateResult() for details on when we consider a
213 // match to have changed. 216 // match to have changed.
214 base::TimeTicks last_time_default_match_changed_; 217 base::TimeTicks last_time_default_match_changed_;
215 218
216 // Timer used to remove any matches copied from the last result. When run 219 // Timer used to remove any matches copied from the last result. When run
217 // invokes |ExpireCopiedEntries|. 220 // invokes |ExpireCopiedEntries|.
218 base::OneShotTimer<AutocompleteController> expire_timer_; 221 base::OneShotTimer<AutocompleteController> expire_timer_;
219 222
223 // Timer used to tell the providers to Stop() searching for matches.
224 base::OneShotTimer<AutocompleteController> stop_timer_;
225
226 // True if the user is in the "stop timer" field trial. If so, the
227 // controller uses the |stop_timer_|.
228 const bool in_stop_timer_field_trial_;
229
220 // True if a query is not currently running. 230 // True if a query is not currently running.
221 bool done_; 231 bool done_;
222 232
223 // Are we in Start()? This is used to avoid updating |result_| and sending 233 // Are we in Start()? This is used to avoid updating |result_| and sending
224 // notifications until Start() has been invoked on all providers. 234 // notifications until Start() has been invoked on all providers.
225 bool in_start_; 235 bool in_start_;
226 236
227 // Has StartZeroSuggest() been called but not Start()? 237 // Has StartZeroSuggest() been called but not Start()?
228 bool in_zero_suggest_; 238 bool in_zero_suggest_;
229 239
230 Profile* profile_; 240 Profile* profile_;
231 241
232 DISALLOW_COPY_AND_ASSIGN(AutocompleteController); 242 DISALLOW_COPY_AND_ASSIGN(AutocompleteController);
233 }; 243 };
234 244
235 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_ 245 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698