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 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // True if the save bubble should display the warm welcome for Google Smart | 104 // True if the save bubble should display the warm welcome for Google Smart |
105 // Lock. | 105 // Lock. |
106 bool ShouldShowGoogleSmartLockWelcome() const; | 106 bool ShouldShowGoogleSmartLockWelcome() const; |
107 | 107 |
108 #if defined(UNIT_TEST) | 108 #if defined(UNIT_TEST) |
109 // Gets the reason the bubble was dismissed. | 109 // Gets the reason the bubble was dismissed. |
110 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { | 110 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { |
111 return dismissal_reason_; | 111 return dismissal_reason_; |
112 } | 112 } |
113 | 113 |
114 void set_clock(scoped_ptr<base::Clock> clock) { clock_ = std::move(clock); } | 114 void set_clock(std::unique_ptr<base::Clock> clock) { |
| 115 clock_ = std::move(clock); |
| 116 } |
115 #endif | 117 #endif |
116 | 118 |
117 private: | 119 private: |
118 enum UserBehaviorOnUpdateBubble { | 120 enum UserBehaviorOnUpdateBubble { |
119 UPDATE_CLICKED, | 121 UPDATE_CLICKED, |
120 NOPE_CLICKED, | 122 NOPE_CLICKED, |
121 NO_INTERACTION | 123 NO_INTERACTION |
122 }; | 124 }; |
123 // Updates |title_| and |title_brand_link_range_| for the | 125 // Updates |title_| and |title_brand_link_range_| for the |
124 // PENDING_PASSWORD_STATE. | 126 // PENDING_PASSWORD_STATE. |
(...skipping 17 matching lines...) Expand all Loading... |
142 gfx::Range save_confirmation_link_range_; | 144 gfx::Range save_confirmation_link_range_; |
143 password_manager::metrics_util::UIDisplayDisposition display_disposition_; | 145 password_manager::metrics_util::UIDisplayDisposition display_disposition_; |
144 password_manager::metrics_util::UIDismissalReason dismissal_reason_; | 146 password_manager::metrics_util::UIDismissalReason dismissal_reason_; |
145 password_manager::metrics_util::UpdatePasswordSubmissionEvent | 147 password_manager::metrics_util::UpdatePasswordSubmissionEvent |
146 update_password_submission_event_; | 148 update_password_submission_event_; |
147 | 149 |
148 // Current statistics for the save password bubble; | 150 // Current statistics for the save password bubble; |
149 password_manager::InteractionsStats interaction_stats_; | 151 password_manager::InteractionsStats interaction_stats_; |
150 | 152 |
151 // Used to retrieve the current time, in base::Time units. | 153 // Used to retrieve the current time, in base::Time units. |
152 scoped_ptr<base::Clock> clock_; | 154 std::unique_ptr<base::Clock> clock_; |
153 | 155 |
154 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 156 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
155 }; | 157 }; |
156 | 158 |
157 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 159 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
OLD | NEW |