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

Unified Diff: chrome/browser/history/history_types.h

Issue 165455: Autocomplete suggestions for bookmark TitleMatch's does not order matching bo... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_types.h
===================================================================
--- chrome/browser/history/history_types.h (revision 24426)
+++ chrome/browser/history/history_types.h (working copy)
@@ -388,10 +388,29 @@
bool reached_beginning() { return reached_beginning_; }
size_t size() const { return results_.size(); }
+ bool empty() const { return results_.empty(); }
URLResult& operator[](size_t i) { return *results_[i]; }
const URLResult& operator[](size_t i) const { return *results_[i]; }
+ typedef std::vector<URLResult*> URLResultVector;
+
+ URLResultVector::const_iterator begin() const {
+ return results_.begin();
+ }
+
+ URLResultVector::const_iterator end() const {
+ return results_.end();
+ }
+
+ URLResultVector::const_reverse_iterator rbegin() const {
+ return results_.rbegin();
+ }
+
+ URLResultVector::const_reverse_iterator rend() const {
+ return results_.rend();
+ }
+
// Returns a pointer to the beginning of an array of all matching indices
// for entries with the given URL. The array will be |*num_matches| long.
// |num_matches| can be NULL if the caller is not interested in the number of
@@ -423,8 +442,6 @@
void DeleteRange(size_t begin, size_t end);
private:
- typedef std::vector<URLResult*> URLResultVector;
-
// Maps the given URL to a list of indices into results_ which identify each
// time an entry with that URL appears. Normally, each URL will have one or
// very few indices after it, so we optimize this to use statically allocated
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698