Files
cromite/build/patches/ungoogled-chromium-Disable-profile-avatar.patch

57 lines
2.5 KiB
Diff

From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 12 Feb 2018 21:29:30 +0100
Subject: ungoogled-chromium: Disable profile avatar
Added some Bromite-specific further improvements
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/browser/BUILD.gn | 2 --
chrome/browser/profiles/profile_attributes_entry.cc | 8 --------
chrome/browser/profiles/profile_attributes_storage.cc | 2 +-
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -854,8 +854,6 @@ static_library("browser") {
"profiles/force_youtube_safety_mode_policy_handler.h",
"profiles/off_the_record_profile_impl.cc",
"profiles/off_the_record_profile_impl.h",
- "profiles/profile_avatar_downloader.cc",
- "profiles/profile_avatar_downloader.h",
"profiles/profile_impl.cc",
"profiles/profile_impl.h",
"profiles/profiles_state.cc",
diff --git a/chrome/browser/profiles/profile_attributes_entry.cc b/chrome/browser/profiles/profile_attributes_entry.cc
--- a/chrome/browser/profiles/profile_attributes_entry.cc
+++ b/chrome/browser/profiles/profile_attributes_entry.cc
@@ -368,14 +368,6 @@ ProfileAttributesEntry::GetAvatarIconWithType(
int size_for_placeholder_avatar,
bool use_high_res_file,
const PlaceholderAvatarIconParams& icon_params) const {
- if (IsUsingGAIAPicture()) {
- // The picture may be null if it has not finished downloading yet; in that
- // case fall through to return the avatar-index-based icon below.
- if (const gfx::Image* image = GetGAIAPicture()) {
- return {*image, AvatarIconType::kNonPlaceholder};
- }
- }
-
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
// TODO(crbug.com/40138086): After launch, remove the treatment of placeholder
// avatars from GetHighResAvatar() and from any other places.
diff --git a/chrome/browser/profiles/profile_attributes_storage.cc b/chrome/browser/profiles/profile_attributes_storage.cc
--- a/chrome/browser/profiles/profile_attributes_storage.cc
+++ b/chrome/browser/profiles/profile_attributes_storage.cc
@@ -986,7 +986,7 @@ void ProfileAttributesStorage::DownloadHighResAvatarIfNeeded(
void ProfileAttributesStorage::DownloadHighResAvatar(
size_t icon_index,
const base::FilePath& profile_path) {
-#if !BUILDFLAG(IS_ANDROID)
+#if false
const char* file_name =
profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index);
DCHECK(file_name);
--