OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 } | 104 } |
105 | 105 |
106 Profile* GetProfile() const; | 106 Profile* GetProfile() const; |
107 content::WebContents* GetWebContents() const; | 107 content::WebContents* GetWebContents() const; |
108 | 108 |
109 // Returns true iff the multiple account selection prompt for account update | 109 // Returns true iff the multiple account selection prompt for account update |
110 // should be presented. | 110 // should be presented. |
111 bool ShouldShowMultipleAccountUpdateUI() const; | 111 bool ShouldShowMultipleAccountUpdateUI() const; |
112 | 112 |
113 // Returns true and updates the internal state iff the Save bubble should | 113 // Returns true and updates the internal state iff the Save bubble should |
114 // switch to the Chrome Sign In promo after the password was saved. Otherwise, | 114 // switch to show a promotion after the password was saved. Otherwise, |
115 // returns false and leaves the current state. | 115 // returns false and leaves the current state. |
116 bool ReplaceToShowSignInPromoIfNeeded(); | 116 bool ReplaceToShowPromotionIfNeeded(); |
117 | 117 |
118 void SetClockForTesting(std::unique_ptr<base::Clock> clock); | 118 void SetClockForTesting(std::unique_ptr<base::Clock> clock); |
119 | 119 |
120 private: | 120 private: |
121 enum UserBehaviorOnUpdateBubble { | 121 enum UserBehaviorOnUpdateBubble { |
122 UPDATE_CLICKED, | 122 UPDATE_CLICKED, |
123 NOPE_CLICKED, | 123 NOPE_CLICKED, |
124 NO_INTERACTION | 124 NO_INTERACTION |
125 }; | 125 }; |
126 class InteractionKeeper; | 126 class InteractionKeeper; |
(...skipping 21 matching lines...) Expand all Loading... |
148 // Responsible for recording all the interactions required. | 148 // Responsible for recording all the interactions required. |
149 std::unique_ptr<InteractionKeeper> interaction_keeper_; | 149 std::unique_ptr<InteractionKeeper> interaction_keeper_; |
150 | 150 |
151 // A bridge to ManagePasswordsUIController instance. | 151 // A bridge to ManagePasswordsUIController instance. |
152 base::WeakPtr<PasswordsModelDelegate> delegate_; | 152 base::WeakPtr<PasswordsModelDelegate> delegate_; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
155 }; | 155 }; |
156 | 156 |
157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
OLD | NEW |