Commit d35d0f75 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Rename kAvatarIconSize to be unique (browser/ui)

When building using Jumbo unnamed namespaces gets merged
and variables with the same name conflict. This happens
for the variables kAvatarIconSize in
views/profiles/dice_accounts_menu.cc and
webui/signin/user_manager_screen_handler.cc.

This commit solves the issue by renaming the variables to
something more file specific.

Bug: 773275
Change-Id: Ibb0aa4bf8c65fcdc70d5b747cccea336ab77ca9b
Reviewed-on: https://chromium-review.googlesource.com/1107708Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#569977}
parent ee7d914f
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace { namespace {
constexpr int kAvatarIconSize = 16; constexpr int kProfilesAvatarIconSize = 16;
// Used to identify the "Use another account" button. // Used to identify the "Use another account" button.
constexpr int kUseAnotherAccountCmdId = std::numeric_limits<int>::max(); constexpr int kUseAnotherAccountCmdId = std::numeric_limits<int>::max();
...@@ -30,7 +30,8 @@ constexpr int kHorizontalIconSpacing = 16; ...@@ -30,7 +30,8 @@ constexpr int kHorizontalIconSpacing = 16;
gfx::ImageSkia SizeAndCircleIcon(const gfx::Image& icon) { gfx::ImageSkia SizeAndCircleIcon(const gfx::Image& icon) {
gfx::Image circled_icon = profiles::GetSizedAvatarIcon( gfx::Image circled_icon = profiles::GetSizedAvatarIcon(
icon, true, kAvatarIconSize, kAvatarIconSize, profiles::SHAPE_CIRCLE); icon, true, kProfilesAvatarIconSize, kProfilesAvatarIconSize,
profiles::SHAPE_CIRCLE);
return *circled_icon.ToImageSkia(); return *circled_icon.ToImageSkia();
} }
......
...@@ -95,7 +95,7 @@ const char kJsApiUserManagerRemoveUserWarningLoadStats[] = ...@@ -95,7 +95,7 @@ const char kJsApiUserManagerRemoveUserWarningLoadStats[] =
"removeUserWarningLoadStats"; "removeUserWarningLoadStats";
const char kJsApiUserManagerAreAllProfilesLocked[] = const char kJsApiUserManagerAreAllProfilesLocked[] =
"areAllProfilesLocked"; "areAllProfilesLocked";
const size_t kAvatarIconSize = 180; const size_t kSigninAvatarIconSize = 180;
const int kMaxOAuthRetries = 3; const int kMaxOAuthRetries = 3;
std::string GetAvatarImage(const ProfileAttributesEntry* entry) { std::string GetAvatarImage(const ProfileAttributesEntry* entry) {
...@@ -112,7 +112,8 @@ std::string GetAvatarImage(const ProfileAttributesEntry* entry) { ...@@ -112,7 +112,8 @@ std::string GetAvatarImage(const ProfileAttributesEntry* entry) {
profiles::GetPlaceholderAvatarIconResourceID()); profiles::GetPlaceholderAvatarIconResourceID());
} }
gfx::Image resized_image = profiles::GetSizedAvatarIcon( gfx::Image resized_image = profiles::GetSizedAvatarIcon(
avatar_image, is_gaia_picture, kAvatarIconSize, kAvatarIconSize); avatar_image, is_gaia_picture, kSigninAvatarIconSize,
kSigninAvatarIconSize);
return webui::GetBitmapDataUrl(resized_image.AsBitmap()); return webui::GetBitmapDataUrl(resized_image.AsBitmap());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment