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

Unified Diff: chrome/browser/ui/tab_helpers.cc

Issue 2184263005: Add a tab helper to record the last visit date for each bookmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments #2 Created 4 years, 5 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/ui/tab_helpers.cc
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
index 85c3e1d5118b996cde98f1f0002cd640c582e82a..a73aafa6b7bce6edf751563ad17275f449eed486 100644
--- a/chrome/browser/ui/tab_helpers.cc
+++ b/chrome/browser/ui/tab_helpers.cc
@@ -78,6 +78,11 @@
#include "components/zoom/zoom_controller.h"
#endif // BUILDFLAG(ANDROID_JAVA_UI)
+#if defined(OS_ANDROID)
+#include "chrome/browser/bookmarks/bookmark_model_factory.h"
Avi (use Gerrit) 2016/08/01 17:01:41 Why is this different than the ANDROID_JAVA_UI blo
Philipp Keck 2016/08/02 13:05:33 The only documentation I found on these flags is t
Ted C 2016/08/03 01:11:40 Does this code work with the webui based NTP or ju
+#include "chrome/browser/ntp_snippets/bookmark_last_visit_updater.h"
+#endif // defined(OS_ANDROID)
+
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
#include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
#endif
@@ -218,6 +223,13 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) {
banners::AppBannerManagerDesktop::CreateForWebContents(web_contents);
#endif
+#if defined(OS_ANDROID)
+ BookmarkLastVisitUpdater::CreateForWebContentsWithBookmarkModel(
+ web_contents,
+ BookmarkModelFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext())));
Avi (use Gerrit) 2016/08/01 17:01:41 You should totally fix BookmarkModelFactory::GetFo
Philipp Keck 2016/08/02 13:05:33 Added BookmarkModelFactory::GetForBrowserContext(c
+#endif // defined(OS_ANDROID)
+
// --- Feature tab helpers behind flags ---
#if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)

Powered by Google App Engine
This is Rietveld 408576698