From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Mon, 12 Feb 2018 21:29:30 +0100
Subject: ungoogled-chromium: Disable profile avatar downloading

Added some Bromite-specific further improvements
---
 chrome/browser/BUILD.gn                              |  2 --
 chrome/browser/profiles/profile_attributes_entry.cc  | 14 --------------
 chrome/browser/profiles/profile_avatar_downloader.cc |  8 +-------
 3 files changed, 1 insertion(+), 23 deletions(-)

diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1364,8 +1364,6 @@ jumbo_split_static_library("browser") {
     "profiles/profile_attributes_entry.h",
     "profiles/profile_attributes_storage.cc",
     "profiles/profile_attributes_storage.h",
-    "profiles/profile_avatar_downloader.cc",
-    "profiles/profile_avatar_downloader.h",
     "profiles/profile_avatar_icon_util.cc",
     "profiles/profile_avatar_icon_util.h",
     "profiles/profile_destroyer.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
@@ -94,20 +94,6 @@ base::string16 ProfileAttributesEntry::GetUserName() const {
 }
 
 const gfx::Image& ProfileAttributesEntry::GetAvatarIcon() const {
-  if (IsUsingGAIAPicture()) {
-    const gfx::Image* image = GetGAIAPicture();
-    if (image)
-      return *image;
-  }
-
-#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-  // Use the high resolution version of the avatar if it exists. Mobile and
-  // ChromeOS don't need the high resolution version so no need to fetch it.
-  const gfx::Image* image = GetHighResAvatar();
-  if (image)
-    return *image;
-#endif
-
   int resource_id =
       profiles::GetDefaultAvatarIconResourceIDAtIndex(GetAvatarIconIndex());
   return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
diff --git a/chrome/browser/profiles/profile_avatar_downloader.cc b/chrome/browser/profiles/profile_avatar_downloader.cc
--- a/chrome/browser/profiles/profile_avatar_downloader.cc
+++ b/chrome/browser/profiles/profile_avatar_downloader.cc
@@ -16,19 +16,13 @@
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "ui/gfx/image/image.h"
 
-namespace {
-const char kHighResAvatarDownloadUrlPrefix[] =
-    "https://www.gstatic.com/chrome/profile_avatars/";
-}
-
 ProfileAvatarDownloader::ProfileAvatarDownloader(
     size_t icon_index,
     const FetchCompleteCallback& callback)
     : icon_index_(icon_index),
       callback_(callback) {
   DCHECK(!callback_.is_null());
-  GURL url(std::string(kHighResAvatarDownloadUrlPrefix) +
-           profiles::GetDefaultAvatarIconFileNameAtIndex(icon_index));
+  GURL url(std::string("about:blank"));
   net::NetworkTrafficAnnotationTag traffic_annotation =
       net::DefineNetworkTrafficAnnotation("profile_avatar", R"(
         semantics {
-- 
2.11.0

