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

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

Issue 43054: Stop history search going on beyond the start of history.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/history/history_types.cc
===================================================================
--- chrome/browser/history/history_types.cc (revision 11260)
+++ chrome/browser/history/history_types.cc (working copy)
@@ -92,7 +92,7 @@
// QueryResults ----------------------------------------------------------------
-QueryResults::QueryResults() {
+QueryResults::QueryResults() : reached_beginning_(false) {
}
QueryResults::~QueryResults() {
@@ -119,6 +119,7 @@
void QueryResults::Swap(QueryResults* other) {
std::swap(first_time_searched_, other->first_time_searched_);
+ std::swap(reached_beginning_, other->reached_beginning_);
results_.swap(other->results_);
url_to_results_.swap(other->url_to_results_);
}
@@ -142,6 +143,9 @@
if (first_time_searched_ > other->first_time_searched_)
std::swap(first_time_searched_, other->first_time_searched_);
+ if (reached_beginning_ != other->reached_beginning_)
+ std::swap(reached_beginning_, other->reached_beginning_);
+
for (size_t i = 0; i < other->results_.size(); i++) {
// Just transfer pointer ownership.
results_.push_back(other->results_[i]);

Powered by Google App Engine
This is Rietveld 408576698