| 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> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
| 10 #include "base/time/clock.h" | 12 #include "base/time/clock.h" |
| 11 #include "components/autofill/core/common/password_form.h" | 13 #include "components/autofill/core/common/password_form.h" |
| 12 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 14 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
| 13 #include "components/password_manager/core/browser/statistics_table.h" | 15 #include "components/password_manager/core/browser/statistics_table.h" |
| 14 #include "components/password_manager/core/common/password_manager_ui.h" | 16 #include "components/password_manager/core/common/password_manager_ui.h" |
| 15 #include "content/public/browser/web_contents_observer.h" | 17 #include "content/public/browser/web_contents_observer.h" |
| 16 #include "ui/gfx/range/range.h" | 18 #include "ui/gfx/range/range.h" |
| 17 | 19 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 137 |
| 136 // True if the autosignin toast should display the warm welcome message. | 138 // True if the autosignin toast should display the warm welcome message. |
| 137 bool ShouldShowAutoSigninWarmWelcome() const; | 139 bool ShouldShowAutoSigninWarmWelcome() const; |
| 138 | 140 |
| 139 #if defined(UNIT_TEST) | 141 #if defined(UNIT_TEST) |
| 140 // Gets the reason the bubble was dismissed. | 142 // Gets the reason the bubble was dismissed. |
| 141 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { | 143 password_manager::metrics_util::UIDismissalReason dismissal_reason() const { |
| 142 return dismissal_reason_; | 144 return dismissal_reason_; |
| 143 } | 145 } |
| 144 | 146 |
| 145 void set_clock(scoped_ptr<base::Clock> clock) { clock_ = clock.Pass(); } | 147 void set_clock(scoped_ptr<base::Clock> clock) { clock_ = std::move(clock); } |
| 146 #endif | 148 #endif |
| 147 | 149 |
| 148 private: | 150 private: |
| 149 enum UserBehaviorOnUpdateBubble { | 151 enum UserBehaviorOnUpdateBubble { |
| 150 UPDATE_CLICKED, | 152 UPDATE_CLICKED, |
| 151 NOPE_CLICKED, | 153 NOPE_CLICKED, |
| 152 NO_INTERACTION | 154 NO_INTERACTION |
| 153 }; | 155 }; |
| 154 // Updates |title_| and |title_brand_link_range_| for the | 156 // Updates |title_| and |title_brand_link_range_| for the |
| 155 // PENDING_PASSWORD_STATE. | 157 // PENDING_PASSWORD_STATE. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 182 // Current statistics for the save password bubble; | 184 // Current statistics for the save password bubble; |
| 183 password_manager::InteractionsStats interaction_stats_; | 185 password_manager::InteractionsStats interaction_stats_; |
| 184 | 186 |
| 185 // Used to retrieve the current time, in base::Time units. | 187 // Used to retrieve the current time, in base::Time units. |
| 186 scoped_ptr<base::Clock> clock_; | 188 scoped_ptr<base::Clock> clock_; |
| 187 | 189 |
| 188 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); | 190 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); |
| 189 }; | 191 }; |
| 190 | 192 |
| 191 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ | 193 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ |
| OLD | NEW |