mirror of
https://abf.rosa.ru/djam/chromium-browser-stable.git
synced 2025-02-23 14:42:49 +00:00
103 lines
4.1 KiB
Diff
103 lines
4.1 KiB
Diff
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 26d7e46..38dd350 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 9311059..0f697ff 100644
|
|
--- a/chrome/browser/resources/welcome/signin_view.html
|
|
+++ b/chrome/browser/resources/welcome/signin_view.html
|
|
@@ -9,6 +9,7 @@
|
|
outline: none;
|
|
}
|
|
</style>
|
|
+<!--
|
|
<div id="container">
|
|
<onboarding-background id="background" class="fade-in">
|
|
</onboarding-background>
|
|
@@ -25,3 +26,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 8cf74d6..6e80536 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
|
|
@@ -526,8 +524,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 =
|
|
@@ -555,6 +552,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.
|
|
@@ -582,6 +580,7 @@ void ProfileMenuView::BuildSyncInfo() {
|
|
/*show_sync_badge=*/false);
|
|
#endif
|
|
}
|
|
+#endif //if 0
|
|
}
|
|
|
|
void ProfileMenuView::BuildFeatureButtons() {
|