Home | History | Annotate | Download | only in history

Lines Matching defs:visits

45 // Reads all types of visits starting from beginning of time to the given end
50 VisitVector* visits, int max_visits) const OVERRIDE {
52 DCHECK(visits) << "visit vector has to exist in order to populate it";
54 db->GetAllVisitsInRange(Time(), end_time, max_visits, visits);
55 // When we got the maximum number of visits we asked for, we say there could
57 return static_cast<int>(visits->size()) == max_visits;
61 // Reads only AUTO_SUBFRAME visits, within a computed range. The range is
64 // there are no more additional visits to expire by this reader.
70 VisitVector* visits, int max_visits) const OVERRIDE {
72 DCHECK(visits) << "visit vector has to exist in order to populate it";
88 visits);
89 bool more = static_cast<int>(visits->size()) == max_visits;
123 // The number of visits we will expire very time we check for old items. This
212 // Collect all the visits and delete them. Note that we don't give
213 // up if there are no visits, since the URL could still have an
216 VisitVector visits;
217 main_db_->GetVisitsForURL(url_row.id(), &visits);
219 DeleteVisitRelatedInfo(visits, &dependencies);
222 // URL, and not starting with visits in a given time range). We
244 // Find the affected visits and delete them.
246 VisitVector visits;
247 main_db_->GetAllVisitsInRange(begin_time, end_time, 0, &visits);
254 all_visits.swap(visits);
258 visits.push_back(*visit);
261 ExpireVisits(visits);
277 // Find the affected visits and delete them.
279 VisitVector visits;
280 main_db_->GetVisitsForTimes(times, &visits);
281 ExpireVisits(visits);
284 void ExpireHistoryBackend::ExpireVisits(const VisitVector& visits) {
285 if (visits.empty())
289 DeleteVisitRelatedInfo(visits, &dependencies);
294 ExpireURLsForVisits(visits, &dependencies);
342 // reader types (in case we want to expire different types of visits in
395 const VisitVector& visits,
397 for (size_t i = 0; i < visits.size(); i++) {
399 main_db_->DeleteVisit(visits[i]);
403 dependencies->affected_urls.find(visits[i].url_id);
406 if (!main_db_->GetURLRow(visits[i].url_id, &row))
408 dependencies->affected_urls[visits[i].url_id] = row;
474 const VisitVector& visits,
476 // First find all unique URLs and the number of visits we're deleting for
479 for (size_t i = 0; i < visits.size(); i++) {
480 ChangedURL& cur = changed_urls[visits[i].url_id];
486 content::PageTransitionStripQualifier(visits[i].transition);
490 !content::PageTransitionIsRedirect(visits[i].transition)) ||
495 // Check each unique URL with deleted visits.
504 // Check if there are any other visits for this URL and update the time
513 // Don't delete URLs with visits still in the DB, or bookmarked.
517 // Not bookmarked and no more visits. Nuke the url.
534 const VisitVector& visits,
543 for (size_t i = 0; i < visits.size(); i++) {
545 dependencies->affected_urls.find(visits[i].url_id);
550 if (!main_db_->GetURLRow(visits[i].url_id, &row) ||
563 // Retrieve the sources for all the archived visits before archiving.
565 // from visits at the same index.
567 main_db_->GetVisitsSource(visits, &visit_sources);
569 // Now archive the visits since we know the URL ID to make them reference.
570 // The source visit list should still reference the visits in the main DB, but
571 // we will update it to reflect only the visits that were successfully
573 for (size_t i = 0; i < visits.size(); i++) {
575 // not store referring visits since we delete many of the visits when
577 VisitRow cur_visit(visits[i]);
580 VisitSourceMap::iterator iter = visit_sources.find(visits[i].visit_id);
638 // Some visits we'll delete while others we'll archive.
657 // only those URLs that were actually deleted instead of having some visits