diff options
Diffstat (limited to 'chromium/chrome/browser/media/feeds')
-rw-r--r-- | chromium/chrome/browser/media/feeds/media_feeds_store.mojom | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/chromium/chrome/browser/media/feeds/media_feeds_store.mojom b/chromium/chrome/browser/media/feeds/media_feeds_store.mojom index ec77b81c049..bfb3795fb67 100644 --- a/chromium/chrome/browser/media/feeds/media_feeds_store.mojom +++ b/chromium/chrome/browser/media/feeds/media_feeds_store.mojom @@ -10,6 +10,7 @@ import "mojo/public/mojom/base/time.mojom"; import "url/mojom/origin.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; import "url/mojom/url.mojom"; +import "mojo/public/mojom/base/unguessable_token.mojom"; struct MediaFeed { // The ID of the field in storage. @@ -67,13 +68,21 @@ struct MediaFeed { // have been deleted and the feed status has been reset to default. ResetReason reset_reason; - // An associated origin is an origin associated with the feed. If the cookies - // are deleted or expire on the origin then we will delete the feed items. - // https://wicg.github.io/media-feeds/#dfn-associated-origin - array<url.mojom.Origin> associated_origins; + // Token used to invalidate ongoing fetches for the feed. If there is a token + // mismatch when feed fetch data returns (the reset token when the fetch began + // does not match the feed's current reset token), the data is stale and + // shouldn't be stored because the feed has been reset. + mojo_base.mojom.UnguessableToken? reset_token; // Contains details about the user signed into the website. UserIdentifier? user_identifier; + + // If set then changes to the cookie name provided on the feed origin or any + // associated origin will trigger the feed to be reset. + string cookie_name_filter; + + // The result of safe search checking this media feed. + SafeSearchResult safe_search_result; }; // Contains details about the user signed into the website. @@ -345,10 +354,22 @@ struct MediaImage { array<ContentAttribute> content_attributes; }; +// Whether the feed item can be considered "family friendly". If this is not +// specified then this will be |kUnknown|. This enum is committed to storage +// so do not change the numbering. +enum IsFamilyFriendly { + kUnknown = 0, + kYes = 1, + kNo = 2, +}; + // The Media Feed Item is an individual item stored in a Media Feed. It // represents a single recommendation such as a video or TV show. // https://wicg.github.io/media-feeds/index.html#media-feed-item struct MediaFeedItem { + // The ID of the feed item in storage. + int64 id; + // The type of this feed item such as a video or TV show. MediaFeedItemType type; @@ -362,7 +383,7 @@ struct MediaFeedItem { mojo_base.mojom.Time date_published; // Whether the media item is considered "family friendly". - bool is_family_friendly; + IsFamilyFriendly is_family_friendly; // The action status for this feed item. MediaFeedItemActionStatus action_status; @@ -414,6 +435,12 @@ struct DebugInformation { // The value of the Media Feeds Safe Search checking consent pref. bool safe_search_pref_value; + + // Whether the MediaFeedsBackgroundFetching feature is enabled. + bool background_fetching_feature_enabled; + + // The value of the Media Feeds background fetching pref. + bool background_fetching_pref_value; }; // MediaFeedStore allows the Media Feeds WebUI to access data from the Media @@ -425,6 +452,9 @@ interface MediaFeedsStore { // Updates the Safe Search checking enabled pref to |value|. SetSafeSearchEnabledPref(bool value) => (); + // Updates the background fetching enabled pref to |value|. + SetBackgroundFetchingPref(bool value) => (); + // Gets all the discovered media feeds. GetMediaFeeds() => (array<MediaFeed> feeds); @@ -433,6 +463,7 @@ interface MediaFeedsStore { // Fetch the details of a previously-discovered media feed and store them in // media history. The feed ID is the unique ID for the feed from the Media - // History store. - FetchMediaFeed(int64 feed_id) => (); + // History store. The logs contain information about any problems fetching or + // parsing the feed. + FetchMediaFeed(int64 feed_id) => (string logs); }; |