LeOSium_webview/LeOS/patches/Disable-feeds-support-by-de...

86 lines
3.8 KiB
Diff
Raw Normal View History

2023-11-18 11:46:19 +01:00
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 19 Dec 2019 22:52:53 +0100
Subject: Disable feeds support by default
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
.../chromium/chrome/browser/feed/FeedFeatures.java | 8 +-------
chrome/browser/prefs/browser_prefs.cc | 4 ++--
components/feed/core/common/pref_names.cc | 13 +------------
components/feed/feed_feature_list.cc | 4 ++--
4 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
--- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
+++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedFeatures.java
@@ -46,13 +46,7 @@ public final class FeedFeatures {
* the user is signed in and confirms it's not a child profile.
*/
public static boolean isWebFeedUIEnabled() {
- // TODO(b/197354832, b/188188861): change consent check to SIGNIN.
- return ChromeFeatureList.isEnabled(ChromeFeatureList.WEB_FEED)
- && IdentityServicesProvider.get()
- .getSigninManager(Profile.getLastUsedRegularProfile())
- .getIdentityManager()
- .hasPrimaryAccount(ConsentLevel.SIGNIN)
- && !Profile.getLastUsedRegularProfile().isChild();
+ return false;
}
public static boolean shouldUseWebFeedAwarenessIPH() {
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1765,10 +1765,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
supervised_user::SupervisedUserService::RegisterProfilePrefs(registry);
#endif
-#if BUILDFLAG(ENABLE_FEED_V2)
+//#if BUILDFLAG(ENABLE_FEED_V2)
feed::prefs::RegisterFeedSharedProfilePrefs(registry);
feed::RegisterProfilePrefs(registry);
-#endif
+//#endif
#if BUILDFLAG(IS_ANDROID)
cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
diff --git a/components/feed/core/common/pref_names.cc b/components/feed/core/common/pref_names.cc
--- a/components/feed/core/common/pref_names.cc
+++ b/components/feed/core/common/pref_names.cc
@@ -105,18 +105,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
}
void MigrateObsoleteProfilePrefsOct_2022(PrefService* prefs) {
- const base::Value* val =
- prefs->GetUserPrefValue(prefs::kExperimentsDeprecated);
- const base::Value::Dict* old = val ? val->GetIfDict() : nullptr;
- if (old) {
- base::Value::Dict dict;
- for (const auto kv : *old) {
- base::Value::List list;
- list.Append(kv.second.GetString());
- dict.Set(kv.first, std::move(list));
- }
- prefs->SetDict(feed::prefs::kExperimentsV2, std::move(dict));
- }
+ prefs->ClearPref(feed::prefs::kExperimentsV2);
prefs->ClearPref(prefs::kExperimentsDeprecated);
}
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc
--- a/components/feed/feed_feature_list.cc
+++ b/components/feed/feed_feature_list.cc
@@ -20,8 +20,8 @@ namespace feed {
// InterestFeedV2 is cached in ChromeCachedFlags. If the default value here is
// changed, please update the cached one's default value in CachedFeatureFlags.
BASE_FEATURE(kInterestFeedV2,
- "InterestFeedV2",
- base::FEATURE_ENABLED_BY_DEFAULT);
+ "InterestFeedV2", // must be disabled
+ base::FEATURE_DISABLED_BY_DEFAULT); // by default in Bromite
BASE_FEATURE(kInterestFeedV2Autoplay,
"InterestFeedV2Autoplay",
--
2.25.1