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

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

Issue 10067018: Add PrerenderLocalPredictor, which will eventually perform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/history/history_backend.h ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend.cc
===================================================================
--- chrome/browser/history/history_backend.cc (revision 133528)
+++ chrome/browser/history/history_backend.cc (working copy)
@@ -770,6 +770,7 @@
// Add the visit with the time to the database.
VisitRow visit_info(url_id, time, referring_visit, transition, 0);
VisitID visit_id = db_->AddVisit(&visit_info, visit_source);
+ NotifyVisitObservers(visit_info);
if (visit_info.visit_time < first_recorded_time_)
first_recorded_time_ = visit_info.visit_time;
@@ -863,6 +864,7 @@
NOTREACHED() << "Adding visit failed.";
return;
}
+ NotifyVisitObservers(visit_info);
if (visit_info.visit_time < first_recorded_time_)
first_recorded_time_ = visit_info.visit_time;
@@ -2477,4 +2479,15 @@
return true;
}
+void HistoryBackend::NotifyVisitObservers(const VisitRow& visit) {
+ BriefVisitInfo info;
+ info.url_id = visit.url_id;
+ info.time = visit.visit_time;
+ info.transition = visit.transition;
+ // If we don't have a delegate yet during setup or shutdown, we will drop
+ // these notifications.
+ if (delegate_.get())
+ delegate_->NotifyVisitDBObserversOnAddVisit(info);
+}
+
} // namespace history
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698