| Index: components/offline_pages/offline_page_client_policy.h
|
| diff --git a/components/offline_pages/offline_page_client_policy.h b/components/offline_pages/offline_page_client_policy.h
|
| index 20fd564ecb99c22f42f66bac909581b67e3d3e4e..b52d51dcaed08ab057d4bbd5b467356cb37b6121 100644
|
| --- a/components/offline_pages/offline_page_client_policy.h
|
| +++ b/components/offline_pages/offline_page_client_policy.h
|
| @@ -49,11 +49,18 @@ struct LifetimePolicy {
|
| struct FeaturePolicy {
|
| // Whether pages are shown in download ui.
|
| bool is_supported_by_download;
|
| + // Whether pages are shown in recent tabs ui.
|
| + bool is_supported_by_recent_tabs;
|
| + // Whether pages should only be viewed in the tab they were generated in.
|
| + bool only_shown_in_original_tab;
|
| // Whether pages are removed on user-initiated cache reset. Defaults to true.
|
| bool is_removed_on_cache_reset;
|
|
|
| FeaturePolicy()
|
| - : is_supported_by_download(false), is_removed_on_cache_reset(true){};
|
| + : is_supported_by_download(false),
|
| + is_supported_by_recent_tabs(false),
|
| + only_shown_in_original_tab(false),
|
| + is_removed_on_cache_reset(true){};
|
| };
|
|
|
| // The struct describing policies for various namespaces (Bookmark, Last-N etc.)
|
| @@ -118,12 +125,25 @@ class OfflinePageClientPolicyBuilder {
|
| return *this;
|
| }
|
|
|
| + OfflinePageClientPolicyBuilder& SetIsSupportedByRecentTabs(
|
| + const bool is_recent_tabs) {
|
| + policy_.feature_policy.is_supported_by_recent_tabs = is_recent_tabs;
|
| + return *this;
|
| + }
|
| +
|
| OfflinePageClientPolicyBuilder& SetIsRemovedOnCacheReset(
|
| const bool removed_on_cache_reset) {
|
| policy_.feature_policy.is_removed_on_cache_reset = removed_on_cache_reset;
|
| return *this;
|
| }
|
|
|
| + OfflinePageClientPolicyBuilder& SetIsOnlyShownInOriginalTab(
|
| + const bool only_shown_in_original_tab) {
|
| + policy_.feature_policy.only_shown_in_original_tab =
|
| + only_shown_in_original_tab;
|
| + return *this;
|
| + }
|
| +
|
| private:
|
| OfflinePageClientPolicy policy_;
|
|
|
|
|