| 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;
|
|
|