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

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

Issue 631253002: Refactor sending NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_backend.cc
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 7c7dcf26ee4129b5ef9334dd6292c44d4f9e3815..7c667c69a3845f8bbd48199ff2944839cd771094 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -806,15 +806,13 @@ std::pair<URLID, VisitID> HistoryBackend::AddPageVisit(
if (typed_url_syncable_service_.get())
typed_url_syncable_service_->OnUrlVisited(transition, &url_info);
- scoped_ptr<URLVisitedDetails> details(new URLVisitedDetails);
- details->transition = transition;
- details->row = url_info;
- details->visit_time = time;
- // TODO(meelapshah) Disabled due to potential PageCycler regression.
- // Re-enable this.
- // QueryRedirectsTo(url, &details->redirects);
- BroadcastNotifications(chrome::NOTIFICATION_HISTORY_URL_VISITED,
- details.PassAs<HistoryDetails>());
+ if (delegate_) {
+ history::RedirectList redirects;
+ // TODO(meelapshah) Disabled due to potential PageCycler regression.
+ // Re-enable this.
+ // QueryRedirectsTo(url, &redirects);
+ delegate_->NotifyURLVisited(transition, url_info, redirects, time);
+ }
} else {
VLOG(0) << "Failed to build visit insert statement: "
<< "url_id = " << url_id;

Powered by Google App Engine
This is Rietveld 408576698