summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoms@chromium.org <noms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 14:49:40 +0000
committernoms@chromium.org <noms@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-19 14:49:40 +0000
commit448721c3b2da4e84f1b772cd2b027b658bf9ace3 (patch)
tree7d5e256dfafb74455f02929ae0a535260f96ab75
parent5837641caadb6971b3dc079a90ecdbcec1e6fb42 (diff)
downloadchromium_src-448721c3b2da4e84f1b772cd2b027b658bf9ace3.zip
chromium_src-448721c3b2da4e84f1b772cd2b027b658bf9ace3.tar.gz
chromium_src-448721c3b2da4e84f1b772cd2b027b658bf9ace3.tar.bz2
Merge 289964 "[Profiles] Downloading high res avatars should do ..."
> [Profiles] Downloading high res avatars should do nothing on non-desktop > > BUG=404066 > > Review URL: https://codereview.chromium.org/476133002 TBR=noms@chromium.org Review URL: https://codereview.chromium.org/483303003 git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@290553 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/profiles/profile_info_cache.cc5
-rw-r--r--chrome/browser/profiles/profile_info_cache_unittest.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index a6f8d9a..3a49fc0 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -793,6 +793,11 @@ void ProfileInfoCache::RegisterPrefs(PrefRegistrySimple* registry) {
void ProfileInfoCache::DownloadHighResAvatar(
size_t icon_index,
const base::FilePath& profile_path) {
+ // Downloading is only supported on desktop.
+#if defined(OS_ANDROID) || defined(OS_IOS) || defined(OS_CHROMEOS)
+ return;
+#endif
+
// TODO(noms): We should check whether the file already exists on disk
// before trying to re-download it. For now, since this is behind a flag and
// the resources are still changing, re-download it every time the profile
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc
index 92638ae..11a682e 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.cc
+++ b/chrome/browser/profiles/profile_info_cache_unittest.cc
@@ -504,6 +504,8 @@ TEST_F(ProfileInfoCacheTest, AddStubProfile) {
ASSERT_FALSE(names[i].empty());
}
+// High res avatar downloading is only supported on desktop.
+#if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS)
TEST_F(ProfileInfoCacheTest, DownloadHighResAvatarTest) {
EXPECT_EQ(0U, GetCache()->GetNumberOfProfiles());
base::FilePath path_1 = GetProfilePath("path_1");
@@ -551,3 +553,4 @@ TEST_F(ProfileInfoCacheTest, DownloadHighResAvatarTest) {
EXPECT_TRUE(base::DeleteFile(icon_path, true));
EXPECT_FALSE(base::PathExists(icon_path));
}
+#endif