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

Unified Diff: components/history/core/browser/url_row.h

Issue 1143183002: Proof of concept implementation of context based history filtering. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « components/history/core/browser/url_database.cc ('k') | components/history/core/browser/url_row.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/url_row.h
diff --git a/components/history/core/browser/url_row.h b/components/history/core/browser/url_row.h
index f7c956b60071121a2cf1ecbdbfdac2ef0fbd95c2..1d4d28069ee05942f99f82b32db5dacd39c7ab73 100644
--- a/components/history/core/browser/url_row.h
+++ b/components/history/core/browser/url_row.h
@@ -27,6 +27,15 @@ typedef int64 URLID;
// Second, there is a problem copying. If you make a copy of this structure
// (as we allow since we put this into vectors in various places) then the
// dirty bits will not be in sync for these copies.
+
+enum HistoryContext {
+ CONTEXT_NONE = 0, // No distinctive context available.
+ CONTEXT_COPY = 1, // User copied some content.
+ CONTEXT_SAVE_IMAGE = 2, // User saved any image.
+ CONTEXT_PRINT = 3, // User printed the content.
+ CONTEXT_MEDIA_PLAY = 4, // User shares any link.
+};
+
class URLRow {
public:
URLRow();
@@ -99,6 +108,13 @@ class URLRow {
hidden_ = hidden;
}
+ HistoryContext context() const {
+ return context_;
+ }
+ void set_context(HistoryContext context) {
+ context_ = context;
+ }
+
// Helper functor that determines if an URLRow refers to a given URL.
class URLRowHasURL {
public:
@@ -153,6 +169,7 @@ class URLRow {
// is usually for subframes.
bool hidden_;
+ HistoryContext context_;
// We support the implicit copy constuctor and operator=.
};
typedef std::vector<URLRow> URLRows;
« no previous file with comments | « components/history/core/browser/url_database.cc ('k') | components/history/core/browser/url_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698