Lines Matching refs:history

14 #include "chrome/browser/history/history_backend.h"
33 // There's no limit on how many visits the history DB could have for a given
40 static bool CheckVisitOrdering(const history::VisitVector& visits) {
42 for (history::VisitVector::const_iterator visit = visits.begin();
62 history::HistoryBackend* history_backend,
80 history::URLRow* url,
81 history::VisitVector* visits) {
90 // Sometimes (due to a bug elsewhere in the history or sync code, or due to
91 // a crash between adding a URL to the history database and updating the
99 // If modified URL is bookmarked, history backend treats it as modified
105 history::VisitRow visit(
124 // busted browsers, or misuse of the history API, or just plain bugs) but we
141 const history::VisitVector& visits) {
144 static const int kLastImportedSource = history::SOURCE_EXTENSION;
145 history::VisitSourceMap map;
150 for (history::VisitVector::const_iterator it = visits.begin();
185 history::URLRows typed_urls;
190 history::URLRows new_urls;
191 history::URLRows updated_urls;
212 std::map<history::URLID, history::VisitVector> visit_vectors;
213 for (history::URLRows::iterator ix = typed_urls.begin();
239 for (history::URLRows::iterator ix = typed_urls.begin();
244 history::VisitVector& visits = visit_vectors[ix->id()];
249 // Same URL exists in sync data and in history data - compare the
256 // the existing URLRow in the history DB. This is needed because we
260 history::URLRow new_url(*ix);
262 std::vector<history::VisitInfo> added_visits;
280 for (history::VisitVector::iterator it = visits.begin();
298 std::pair<GURL, std::vector<history::VisitInfo> >(ix->url(),
322 // the history DB, so we can add them to our local history DB.
397 // Since we're on the history thread, we don't have to worry about updating
398 // the history database after closing the write transaction, since
409 history::VisitVector* visits_to_remove,
410 history::URLRows* updated_urls,
411 history::URLRows* new_urls) {
412 history::URLRow new_url(GURL(typed_url.url()));
413 history::VisitVector existing_visits;
420 // Don't bother writing this URL to the history DB (if we ignore the
426 visits_to_add->push_back(std::pair<GURL, std::vector<history::VisitInfo> >(
427 new_url.url(), std::vector<history::VisitInfo>()));
512 const history::URLRows* new_urls,
513 const history::URLRows* updated_urls,
515 const history::VisitVector* deleted_visits) {
517 history_backend_->AddPagesWithDetails(*new_urls, history::SOURCE_SYNCED);
538 history::SOURCE_SYNCED)) {
549 // This is bad news, since it means we may end up resurrecting history
559 const history::URLRow& url,
560 history::VisitVector* visits,
561 history::URLRow* new_url,
562 std::vector<history::VisitInfo>* new_visits) {
571 // expired visits, so just overwrite it with our local history data.
621 // We found a visit in the history DB that doesn't exist in the sync DB,
627 // Found a visit in the sync node that doesn't exist in the history DB, so
629 // caller will update the history DB.
630 // If the node visit is older than any existing visit in the history DB,
635 new_visits->push_back(history::VisitInfo(
652 history::VisitVector::iterator visit_ix = visits->begin();
653 for (std::vector<history::VisitInfo>::iterator new_visit =
661 history::VisitRow(url.id(), new_visit->first,
674 const history::URLRow& url,
675 const history::VisitVector& visits,
683 const history::URLRow& url,
684 const history::VisitVector& visits,
705 for (history::VisitVector::const_iterator visit = visits.begin();
717 // the history DB has an inaccurate count for some reason (there's been
718 // bugs in the history code in the past which has left users in the wild
731 for (history::VisitVector::const_iterator visit = visits.begin();
772 const history::VisitVector& old_visits,
774 std::vector<history::VisitInfo>* new_visits,
775 history::VisitVector* removed_visits) {
789 // local history.
794 new_visits->push_back(history::VisitInfo(
812 new_visits->push_back(history::VisitInfo(
821 const sync_pb::TypedUrlSpecifics& typed_url, history::URLRow* new_url) {
827 // the history code update the last_visit field on its own.