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

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

Issue 2013008: Remove --omnibox-popup-count flag. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: nits Created 10 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete.h
diff --git a/chrome/browser/autocomplete/autocomplete.h b/chrome/browser/autocomplete/autocomplete.h
index 54bd9ff791e8f1c35c95ed0c20033222654531bf..e7766ddf639513b4189df17b84610398d9b71063 100644
--- a/chrome/browser/autocomplete/autocomplete.h
+++ b/chrome/browser/autocomplete/autocomplete.h
@@ -538,11 +538,11 @@ class AutocompleteProvider
// NOTE: Remember to call OnProviderUpdate() if matches_ is updated.
virtual void DeleteMatch(const AutocompleteMatch& match) {}
- static void set_max_matches(size_t max_matches) {
- max_matches_ = max_matches;
- }
-
- static size_t max_matches() { return max_matches_; }
+ // A suggested upper bound for how many matches a provider should return.
+ // TODO(pkasting): http://b/1111299 , http://b/933133 This should go away once
+ // we have good relevance heuristics; the controller should handle all
+ // culling.
+ static const size_t kMaxMatches;
protected:
friend class base::RefCountedThreadSafe<AutocompleteProvider>;
@@ -576,13 +576,7 @@ class AutocompleteProvider
const char* name_;
private:
- // A suggested upper bound for how many matches a provider should return.
- // TODO(pkasting): http://b/1111299 , http://b/933133 This should go away once
- // we have good relevance heuristics; the controller should handle all
- // culling.
- static size_t max_matches_;
-
- DISALLOW_EVIL_CONSTRUCTORS(AutocompleteProvider);
+ DISALLOW_COPY_AND_ASSIGN(AutocompleteProvider);
};
typedef AutocompleteProvider::ACProviderListener ACProviderListener;
@@ -628,11 +622,6 @@ class AutocompleteResult {
bool is_history_what_you_typed_match;
};
- static void set_max_matches(size_t max_matches) {
- max_matches_ = max_matches;
- }
- static size_t max_matches() { return max_matches_; }
-
AutocompleteResult();
// operator=() by another name.
@@ -682,12 +671,12 @@ class AutocompleteResult {
void Validate() const;
#endif
- private:
// Max number of matches we'll show from the various providers. We may end
// up showing an additional shortcut for Destinations->History, see
// AddHistoryContentsShortcut.
- static size_t max_matches_;
+ static const size_t kMaxMatches;
+ private:
ACMatches matches_;
const_iterator default_match_;
@@ -701,7 +690,7 @@ class AutocompleteResult {
// 'foo'" result, and this will contain "http://foo/".
GURL alternate_nav_url_;
- DISALLOW_EVIL_CONSTRUCTORS(AutocompleteResult);
+ DISALLOW_COPY_AND_ASSIGN(AutocompleteResult);
};
// AutocompleteController -----------------------------------------------------
@@ -865,7 +854,7 @@ class AutocompleteController : public ACProviderListener {
// fast or continuously the user is typing.
base::RepeatingTimer<AutocompleteController> update_delay_timer_;
- DISALLOW_EVIL_CONSTRUCTORS(AutocompleteController);
+ DISALLOW_COPY_AND_ASSIGN(AutocompleteController);
};
// AutocompleteLog ------------------------------------------------------------
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698