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