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

Side by Side Diff: chrome/browser/ntp_snippets/bookmark_last_visit_updater.h

Issue 2572433002: Disable tracking of visits to bookmarks in incognito (Closed)
Patch Set: Bernhard's comments #2 Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/bookmark_last_visit_updater.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_ 5 #ifndef CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_
6 #define CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_ 6 #define CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 14 matching lines...) Expand all
25 25
26 // A bridge class between platform-specific content::WebContentsObserver and the 26 // A bridge class between platform-specific content::WebContentsObserver and the
27 // generic function ntp_snippets::UpdateBookmarkOnURLVisitedInMainFrame(). 27 // generic function ntp_snippets::UpdateBookmarkOnURLVisitedInMainFrame().
28 class BookmarkLastVisitUpdater 28 class BookmarkLastVisitUpdater
29 : public content::WebContentsObserver, 29 : public content::WebContentsObserver,
30 public content::WebContentsUserData<BookmarkLastVisitUpdater>, 30 public content::WebContentsUserData<BookmarkLastVisitUpdater>,
31 public bookmarks::BookmarkModelObserver { 31 public bookmarks::BookmarkModelObserver {
32 public: 32 public:
33 ~BookmarkLastVisitUpdater() override; 33 ~BookmarkLastVisitUpdater() override;
34 34
35 static void CreateForWebContentsWithBookmarkModel( 35 static void MaybeCreateForWebContentsWithBookmarkModel(
36 content::WebContents* web_contents, 36 content::WebContents* web_contents,
37 bookmarks::BookmarkModel* bookmark_model); 37 bookmarks::BookmarkModel* bookmark_model);
38 38
39 private: 39 private:
40 friend class content::WebContentsUserData<BookmarkLastVisitUpdater>; 40 friend class content::WebContentsUserData<BookmarkLastVisitUpdater>;
41 41
42 BookmarkLastVisitUpdater(content::WebContents* web_contents, 42 BookmarkLastVisitUpdater(content::WebContents* web_contents,
43 bookmarks::BookmarkModel* bookmark_model); 43 bookmarks::BookmarkModel* bookmark_model);
44 44
45 // Overridden from BookmarkModelObserver: 45 // Overridden from BookmarkModelObserver:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void NewURLVisited(content::NavigationHandle* navigation_handle); 80 void NewURLVisited(content::NavigationHandle* navigation_handle);
81 81
82 bookmarks::BookmarkModel* bookmark_model_; 82 bookmarks::BookmarkModel* bookmark_model_;
83 content::WebContents* web_contents_; 83 content::WebContents* web_contents_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(BookmarkLastVisitUpdater); 85 DISALLOW_COPY_AND_ASSIGN(BookmarkLastVisitUpdater);
86 }; 86 };
87 87
88 #endif // CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_ 88 #endif // CHROME_BROWSER_NTP_SNIPPETS_BOOKMARK_LAST_VISIT_UPDATER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/bookmark_last_visit_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698