Chromium Code Reviews| Index: chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.cc |
| diff --git a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.cc b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.cc |
| index 2407284eb936ca3413ea1b106eedaa93982b3ce4..62ef71d7eed371186de19862383804254f759d49 100644 |
| --- a/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.cc |
| +++ b/chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.cc |
| @@ -5,6 +5,7 @@ |
| #include "chrome/browser/ui/views/desktop_ios_promotion/desktop_ios_promotion_view.h" |
| #include "base/strings/utf_string_conversions.h" |
| +#include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h" |
| #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| @@ -30,8 +31,10 @@ int GetDesiredBubbleMaxWidth( |
| } // namespace |
| DesktopIOSPromotionView::DesktopIOSPromotionView( |
| + Profile* profile, |
| desktop_ios_promotion::PromotionEntryPoint entry_point) { |
| - promotion_controller_ = new DesktopIOSPromotionController(); |
| + promotion_controller_ = |
|
sky
2017/02/16 00:13:36
Who owns this?
Also, I tend to think you have the
mrefaat
2017/02/16 21:02:40
Done.
|
| + new DesktopIOSPromotionController(profile, entry_point); |
| int bubbleWidth = ::GetDesiredBubbleMaxWidth(entry_point); |
| views::GridLayout* layout = new views::GridLayout(this); |
| layout->set_minimum_size(gfx::Size(bubbleWidth, 0)); |
| @@ -65,7 +68,7 @@ DesktopIOSPromotionView::DesktopIOSPromotionView( |
| layout->AddView(send_sms_button_); |
| layout->AddView(no_button_); |
| - // TODO(crbug.com/676655): Log impression. |
| + promotion_controller_->OnPromotionShown(); |
| } |
| void DesktopIOSPromotionView::ButtonPressed(views::Button* sender, |