mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
add-flag-to-show-avatar-button.patch: rm redundant conditions
This commit is contained in:
@@ -79,16 +79,13 @@
|
||||
// This should never be called in incognito mode.
|
||||
DCHECK(browser_view->IsRegularOrGuestSession());
|
||||
ProfileAttributesEntry* unused;
|
||||
@@ -42,7 +48,13 @@ void AvatarButtonManager::Update(AvatarB
|
||||
@@ -42,7 +48,10 @@ void AvatarButtonManager::Update(AvatarB
|
||||
->GetProfileAttributesStorage()
|
||||
.GetProfileAttributesWithPath(profile->GetPath(), &unused)) ||
|
||||
// Desktop guest shows the avatar button.
|
||||
- browser_view->IsIncognito())) {
|
||||
+ browser_view->IsIncognito() ||
|
||||
+ browser_view->IsIncognito()) &&
|
||||
+ // Override according to show-avatar-button value.
|
||||
+ (flag_value == "always") ||
|
||||
+ (flag_value == "incognito-and-guest" && in_incognito_or_guest_mode)
|
||||
+ ) &&
|
||||
+ !(flag_value == "incognito-and-guest" && !in_incognito_or_guest_mode) &&
|
||||
+ !(flag_value == "never")) {
|
||||
if (!avatar_button_) {
|
||||
|
||||
Reference in New Issue
Block a user