mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-23 17:42:45 +00:00
Hide not working "Turn on sync" buttons
This commit is contained in:
parent
9bb8103f5a
commit
44c6624c18
2 changed files with 107 additions and 1 deletions
105
0004-Hide-sync-with-Google.patch
Normal file
105
0004-Hide-sync-with-Google.patch
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
From 91050333ece16bfa526d6f44bf2324f71a794220 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
|
||||||
|
Date: Sun, 5 Jun 2022 16:52:13 +0300
|
||||||
|
Subject: [PATCH] Hide sync with Google
|
||||||
|
|
||||||
|
Syncing with Google does not work noawadays because Google decided
|
||||||
|
to block it work other API keys than the ons used in Google Chrome.
|
||||||
|
|
||||||
|
Click "Turn on sync" does not turn it on.
|
||||||
|
|
||||||
|
Hiding:
|
||||||
|
* button in chrome://settings
|
||||||
|
* button when clicking on the user avatar on the right from the address bar
|
||||||
|
* button on the welcome page which is not shown by default in ROSA (?)
|
||||||
|
|
||||||
|
As code is just being commented out in chrome://settings, advanced users
|
||||||
|
probably can uncomemnt it in developer tools without recompiling Chromium
|
||||||
|
if they want to use their own API keys.
|
||||||
|
---
|
||||||
|
.../settings/people_page/sync_account_control.html | 2 ++
|
||||||
|
chrome/browser/resources/welcome/signin_view.html | 2 ++
|
||||||
|
chrome/browser/ui/views/profiles/profile_menu_view.cc | 9 ++++-----
|
||||||
|
3 files changed, 8 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/chrome/browser/resources/settings/people_page/sync_account_control.html b/chrome/browser/resources/settings/people_page/sync_account_control.html
|
||||||
|
index 70b3128642..b91ea8675a 100644
|
||||||
|
--- a/chrome/browser/resources/settings/people_page/sync_account_control.html
|
||||||
|
+++ b/chrome/browser/resources/settings/people_page/sync_account_control.html
|
||||||
|
@@ -117,6 +117,7 @@
|
||||||
|
<!-- TODO(jamescook): Show the promo on Chrome OS if the user is signed-in
|
||||||
|
but has sync disabled. -->
|
||||||
|
<div id="banner" hidden="[[syncStatus.signedIn]]" part="banner"></div>
|
||||||
|
+ <!--
|
||||||
|
<div class="cr-row first"
|
||||||
|
id="promo-header" hidden="[[syncStatus.signedIn]]">
|
||||||
|
<div class="flex cr-padded-text">
|
||||||
|
@@ -135,6 +136,7 @@
|
||||||
|
$i18n{peopleSignIn}
|
||||||
|
</cr-button>
|
||||||
|
</div>
|
||||||
|
+ -->
|
||||||
|
<template is="dom-if" if="[[shouldShowAvatarRow_]]">
|
||||||
|
<div class="cr-row first two-line" id="avatar-row">
|
||||||
|
<div id="avatar-container">
|
||||||
|
diff --git a/chrome/browser/resources/welcome/signin_view.html b/chrome/browser/resources/welcome/signin_view.html
|
||||||
|
index b8ef23a4dc..b127c5b48a 100644
|
||||||
|
--- a/chrome/browser/resources/welcome/signin_view.html
|
||||||
|
+++ b/chrome/browser/resources/welcome/signin_view.html
|
||||||
|
@@ -10,6 +10,7 @@
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
+<!--
|
||||||
|
<div id="container">
|
||||||
|
<onboarding-background id="background" class="fade-in">
|
||||||
|
</onboarding-background>
|
||||||
|
@@ -24,3 +25,4 @@
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
+-->
|
||||||
|
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view.cc b/chrome/browser/ui/views/profiles/profile_menu_view.cc
|
||||||
|
index 1d9b51a8ec..0c597d2e67 100644
|
||||||
|
--- a/chrome/browser/ui/views/profiles/profile_menu_view.cc
|
||||||
|
+++ b/chrome/browser/ui/views/profiles/profile_menu_view.cc
|
||||||
|
@@ -180,9 +180,7 @@ gfx::ImageSkia ProfileMenuView::GetSyncIcon() const {
|
||||||
|
if (profile->IsOffTheRecord() || profile->IsGuestSession())
|
||||||
|
return gfx::ImageSkia();
|
||||||
|
|
||||||
|
- bool is_sync_feature_enabled =
|
||||||
|
- IdentityManagerFactory::GetForProfile(profile)->HasPrimaryAccount(
|
||||||
|
- signin::ConsentLevel::kSync);
|
||||||
|
+ bool is_sync_feature_enabled = false;
|
||||||
|
if (!is_sync_feature_enabled) {
|
||||||
|
// This is done regardless of GetAvatarSyncErrorType() because the icon
|
||||||
|
// should reflect that sync-the-feature is off. The error will still be
|
||||||
|
@@ -517,8 +515,7 @@ void ProfileMenuView::BuildSyncInfo() {
|
||||||
|
|
||||||
|
signin::IdentityManager* identity_manager =
|
||||||
|
IdentityManagerFactory::GetForProfile(profile);
|
||||||
|
- bool is_sync_feature_enabled =
|
||||||
|
- identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSync);
|
||||||
|
+ bool is_sync_feature_enabled = false;
|
||||||
|
// First, check for sync errors. They may exist even if sync-the-feature is
|
||||||
|
// disabled and only sync-the-transport is running.
|
||||||
|
const absl::optional<AvatarSyncErrorType> error =
|
||||||
|
@@ -546,6 +543,7 @@ void ProfileMenuView::BuildSyncInfo() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
// If there's no error and sync-the-feature is disabled, show a sync promo.
|
||||||
|
// For a signed-in user, the promo just opens the "turn on sync" dialog.
|
||||||
|
// For a signed-out user, it prompts for sign-in first.
|
||||||
|
@@ -573,6 +571,7 @@ void ProfileMenuView::BuildSyncInfo() {
|
||||||
|
/*show_sync_badge=*/false);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
+#endif //if 0
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProfileMenuView::BuildFeatureButtons() {
|
||||||
|
--
|
||||||
|
2.35.2
|
||||||
|
|
|
@ -129,10 +129,11 @@ Patch648: fix-debugsource.patch
|
||||||
Patch650: 0001-Functional-new-tab-page-with-non-Google-search-engin.patch
|
Patch650: 0001-Functional-new-tab-page-with-non-Google-search-engin.patch
|
||||||
Patch651: 0002-Yandex-as-default-search-engine.patch
|
Patch651: 0002-Yandex-as-default-search-engine.patch
|
||||||
Patch652: 0003-Remove-voice-search-button.patch
|
Patch652: 0003-Remove-voice-search-button.patch
|
||||||
|
Patch653: 0004-Hide-sync-with-Google.patch
|
||||||
# Block odd interaction with Google servers, probably including loading promo Google logos
|
# Block odd interaction with Google servers, probably including loading promo Google logos
|
||||||
# (e.g. an LGBT-colored one, https://clck.ru/niFdJ)
|
# (e.g. an LGBT-colored one, https://clck.ru/niFdJ)
|
||||||
# https://github.com/Eloston/ungoogled-chromium/blob/master/patches/core/ungoogled-chromium/block-requests.patch
|
# https://github.com/Eloston/ungoogled-chromium/blob/master/patches/core/ungoogled-chromium/block-requests.patch
|
||||||
Patch653: block-requests.patch
|
Patch654: block-requests.patch
|
||||||
|
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: llvm15
|
BuildRequires: llvm15
|
||||||
|
|
Loading…
Add table
Reference in a new issue