Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4578)

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.h

Issue 2025003002: Refactor ManagePasswordsBubbleModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.h
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
index 5c897e6a7baf8a5a204f0c850949a7adb71f9b4b..667f6e9dc5f4781901125ee5c18af85af074701e 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h
@@ -105,16 +105,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver {
// Lock.
bool ShouldShowGoogleSmartLockWelcome() const;
-#if defined(UNIT_TEST)
- // Gets the reason the bubble was dismissed.
- password_manager::metrics_util::UIDismissalReason dismissal_reason() const {
- return dismissal_reason_;
- }
-
- void set_clock(std::unique_ptr<base::Clock> clock) {
- clock_ = std::move(clock);
- }
-#endif
+ void SetClockForTesting(std::unique_ptr<base::Clock> clock);
private:
enum UserBehaviorOnUpdateBubble {
@@ -122,6 +113,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver {
NOPE_CLICKED,
NO_INTERACTION
};
+ class InteractionKeeper;
// Updates |title_| and |title_brand_link_range_| for the
// PENDING_PASSWORD_STATE.
void UpdatePendingStateTitle();
@@ -142,16 +134,9 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver {
base::string16 manage_link_;
base::string16 save_confirmation_text_;
gfx::Range save_confirmation_link_range_;
- password_manager::metrics_util::UIDisplayDisposition display_disposition_;
- password_manager::metrics_util::UIDismissalReason dismissal_reason_;
- password_manager::metrics_util::UpdatePasswordSubmissionEvent
- update_password_submission_event_;
-
- // Current statistics for the save password bubble;
- password_manager::InteractionsStats interaction_stats_;
- // Used to retrieve the current time, in base::Time units.
- std::unique_ptr<base::Clock> clock_;
+ // Responsible for recording all the interactions required.
+ std::unique_ptr<InteractionKeeper> interaction_keeper_;
DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
};
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_bubble_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698