Chromium Code Reviews| Index: chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
| diff --git a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
| index 75f27b20ae231853c79bb61bcccce6dcc26af76f..101d606e8c7057f46c7f86ed61fadbb67af09b1d 100644 |
| --- a/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
| +++ b/chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_controller.h |
| @@ -9,14 +9,12 @@ |
| #include <string> |
| #include "base/macros.h" |
| -#include "chrome/browser/ui/desktop_ios_promotion/sms_service.h" |
| namespace desktop_ios_promotion { |
| enum class PromotionEntryPoint; |
| enum class PromotionDismissalReason; |
| } |
| -class DesktopIOSPromotionView; |
| class Profile; |
| class PrefService; |
| @@ -27,7 +25,6 @@ class DesktopIOSPromotionController { |
| // Must be instantiated on the UI thread. |
| DesktopIOSPromotionController( |
| Profile* profile, |
| - DesktopIOSPromotionView* promotion_view, |
| desktop_ios_promotion::PromotionEntryPoint entry_point); |
| ~DesktopIOSPromotionController(); |
| @@ -36,49 +33,24 @@ class DesktopIOSPromotionController { |
| return entry_point_; |
| } |
| - // Called by the view code when "Send SMS" button is clicked by the user. |
| - void OnSendSMSClicked(); |
| - |
| // Called by the view code when the promotion is ready to show. |
| void OnPromotionShown(); |
| - // Called by the view code when "No Thanks" button is clicked by the user. |
| - void OnNoThanksClicked(); |
| - |
| - // Returns the Recovery phone number, returns empy string if the number is not |
| - // set. |
| - std::string GetUsersRecoveryPhoneNumber(); |
| + // Called by the view when link to detailed promo is clicked by the user. |
| + void OnLearnMoreLinkClicked(); |
| // Used for testing. |
| desktop_ios_promotion::PromotionDismissalReason dismissal_reason() const { |
| return dismissal_reason_; |
| } |
| - private: |
| - // Updates the user's recovery phone number once the sms_service phone query |
| - // returns a response. |
| - void OnGotPhoneNumber(SMSService::Request* request, |
| - bool success, |
| - const std::string& number); |
| - |
| - // Callback that logs the result when sms_service send sms returns a response. |
| - void OnSendSMS(SMSService::Request* request, |
| - bool success, |
| - const std::string& number); |
| - |
| + protected: |
|
sky
2017/05/24 00:03:35
Style guide says no protected members.
mrefaat1
2017/05/24 02:27:17
Done.
sky
2017/05/24 16:49:54
Now you have all the members public.
|
| PrefService* profile_prefs_; |
| const desktop_ios_promotion::PromotionEntryPoint entry_point_; |
| - // Service used to send SMS to the user recovery phone number. |
| - SMSService* sms_service_; |
| - // User's recovery phone number, this is updated by the sms_service. |
| - std::string recovery_number_; |
| - // A Weak pointer to the promotion view. |
| - DesktopIOSPromotionView* promotion_view_; |
| + |
| // Track the action that is responsible for the promotion Dismissal. |
| desktop_ios_promotion::PromotionDismissalReason dismissal_reason_; |
| - base::WeakPtrFactory<DesktopIOSPromotionController> weak_ptr_factory_; |
| - |
| DISALLOW_COPY_AND_ASSIGN(DesktopIOSPromotionController); |
| }; |