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

Unified Diff: chrome/browser/autocomplete/history_quick_provider.h

Issue 7618028: Tweak typed-count Usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/history_quick_provider.h
===================================================================
--- chrome/browser/autocomplete/history_quick_provider.h (revision 97032)
+++ chrome/browser/autocomplete/history_quick_provider.h (working copy)
@@ -40,6 +40,13 @@
// Performs the autocomplete matching and scoring.
void DoAutocomplete();
+ // Disable this provider. For unit testing purposes only. This is required
+ // because this provider is closely associated with the HistoryURLProvider
+ // and in order to properly test the latter the HistoryQuickProvider must
+ // be disabled.
+ // TODO(mrossetti): Eliminate this once the HUP has been refactored.
+ static void set_disabled() { disabled_ = true; }
+
private:
friend class HistoryQuickProviderTest;
FRIEND_TEST_ALL_PREFIXES(HistoryQuickProviderTest, Spans);
@@ -89,6 +96,9 @@
// Only used for testing.
scoped_ptr<history::InMemoryURLIndex> index_for_testing_;
+
+ // This provider is disabled when true.
+ static bool disabled_;
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698