Index: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
index 39b9a08b5ff55526cdb2ec8cd86762b442e7afe9..e07c399ca2951a4347ec6c9d89753a8a8c0a56fd 100644 |
--- a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
+++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_bubble_view.cc |
@@ -16,19 +16,6 @@ |
#include "ui/views/controls/button/md_text_button.h" |
#include "ui/views/layout/grid_layout.h" |
-namespace { |
- |
-int GetDesiredBubbleMaxWidth( |
- desktop_ios_promotion::PromotionEntryPoint entry_point) { |
- if (entry_point == |
- desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE) { |
- return ManagePasswordsBubbleView::kDesiredBubbleWidth; |
- } |
- return 0; |
-} |
- |
-} // namespace |
- |
DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView( |
Profile* profile, |
desktop_ios_promotion::PromotionEntryPoint entry_point) |
@@ -38,8 +25,7 @@ DesktopIOSPromotionBubbleView::DesktopIOSPromotionBubbleView( |
base::MakeUnique<DesktopIOSPromotionController>(profile, |
this, |
entry_point)) { |
- int bubble_width = |
- ::GetDesiredBubbleMaxWidth(promotion_controller_->entry_point()); |
+ int bubble_width = ManagePasswordsBubbleView::kDesiredBubbleWidth; |
views::GridLayout* layout = new views::GridLayout(this); |
layout->set_minimum_size(gfx::Size(bubble_width, 0)); |
SetLayoutManager(layout); |
@@ -102,6 +88,7 @@ void DesktopIOSPromotionBubbleView::ButtonPressed(views::Button* sender, |
void DesktopIOSPromotionBubbleView::UpdateRecoveryPhoneLabel() { |
std::string number = promotion_controller_->GetUsersRecoveryPhoneNumber(); |
if (!number.empty()) { |
+ promotion_text_label_->GetPreferredSize(); |
promotion_text_label_->SetText(desktop_ios_promotion::GetPromoText( |
promotion_controller_->entry_point(), number)); |
SizeToPreferredSize(); |