diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch b/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch new file mode 100644 index 0000000..9d21b6f --- /dev/null +++ b/www/chromium-uc/patches/extra/inox-patchset/0008-restore-classic-ntp.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | --- chrome/browser/search/search.cc.orig | ||
| 2 | +++ chrome/browser/search/search.cc | ||
| 3 | @@ -182,26 +182,7 @@ struct NewTabURLDetails { | ||
| 4 | : chrome::kChromeUINewTabPageThirdPartyURL); | ||
| 5 | #endif | ||
| 6 | |||
| 7 | - if (ShouldShowLocalNewTab(profile)) | ||
| 8 | - return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); | ||
| 9 | - | ||
| 10 | - const TemplateURL* template_url = | ||
| 11 | - GetDefaultSearchProviderTemplateURL(profile); | ||
| 12 | - if (!profile || !template_url) | ||
| 13 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BAD); | ||
| 14 | - | ||
| 15 | - GURL search_provider_url(template_url->new_tab_url_ref().ReplaceSearchTerms( | ||
| 16 | - TemplateURLRef::SearchTermsArgs(std::u16string()), | ||
| 17 | - UIThreadSearchTermsData())); | ||
| 18 | - | ||
| 19 | - if (!search_provider_url.is_valid()) | ||
| 20 | - return NewTabURLDetails(local_url, NEW_TAB_URL_NOT_SET); | ||
| 21 | - if (!search_provider_url.SchemeIsCryptographic()) | ||
| 22 | - return NewTabURLDetails(local_url, NEW_TAB_URL_INSECURE); | ||
| 23 | - if (!IsURLAllowedForSupervisedUser(search_provider_url, profile)) | ||
| 24 | - return NewTabURLDetails(local_url, NEW_TAB_URL_BLOCKED); | ||
| 25 | - | ||
| 26 | - return NewTabURLDetails(search_provider_url, NEW_TAB_URL_VALID); | ||
| 27 | + return NewTabURLDetails(local_url, NEW_TAB_URL_VALID); | ||
| 28 | } | ||
| 29 | |||
| 30 | const GURL url; | ||
| 31 | --- components/ntp_snippets/features.cc.orig | ||
| 32 | +++ components/ntp_snippets/features.cc | ||
| 33 | @@ -39,7 +39,7 @@ const base::Feature* const kAllFeatures[ | ||
| 34 | &kOptionalImagesEnabledFeature}; | ||
| 35 | |||
| 36 | const base::Feature kArticleSuggestionsFeature{ | ||
| 37 | - "NTPArticleSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; | ||
| 38 | + "NTPArticleSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; | ||
| 39 | |||
| 40 | const base::Feature kRemoteSuggestionsEmulateM58FetchingSchedule{ | ||
| 41 | "RemoteSuggestionsEmulateM58FetchingSchedule", | ||
| 42 | @@ -69,10 +69,10 @@ const char kNotificationsDailyLimit[] = | ||
| 43 | const char kNotificationsIgnoredLimitParam[] = "ignored_limit"; | ||
| 44 | |||
| 45 | const base::Feature kKeepPrefetchedContentSuggestions{ | ||
| 46 | - "KeepPrefetchedContentSuggestions", base::FEATURE_ENABLED_BY_DEFAULT}; | ||
| 47 | + "KeepPrefetchedContentSuggestions", base::FEATURE_DISABLED_BY_DEFAULT}; | ||
| 48 | |||
| 49 | const base::Feature kOptionalImagesEnabledFeature{ | ||
| 50 | - "NTPRemoteSuggestionsOptionalImages", base::FEATURE_ENABLED_BY_DEFAULT}; | ||
| 51 | + "NTPRemoteSuggestionsOptionalImages", base::FEATURE_DISABLED_BY_DEFAULT}; | ||
| 52 | |||
| 53 | std::vector<const base::Feature*> GetAllFeatures() { | ||
| 54 | // Skip the last feature as it's a nullptr. | ||
