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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.h

Issue 1304573004: Added UMA statistics for change passwords in the Password Manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 4 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h"
10 #include "components/autofill/core/common/password_form.h" 10 #include "components/autofill/core/common/password_form.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Called by the view code when the bubble is shown. 42 // Called by the view code when the bubble is shown.
43 void OnBubbleShown(ManagePasswordsBubble::DisplayReason reason); 43 void OnBubbleShown(ManagePasswordsBubble::DisplayReason reason);
44 44
45 // Called by the view code when the bubble is hidden. 45 // Called by the view code when the bubble is hidden.
46 void OnBubbleHidden(); 46 void OnBubbleHidden();
47 47
48 // Called by the view code when the "Cancel" button in clicked by the user. 48 // Called by the view code when the "Cancel" button in clicked by the user.
49 void OnCancelClicked(); 49 void OnCancelClicked();
50 50
51 // Called by the view code when the "Nope" button in clicked by the user in
52 // update bubble.
53 void OnNopeUpdateClicked();
54
51 // Called by the view code when the "Never for this site." button in clicked 55 // Called by the view code when the "Never for this site." button in clicked
52 // by the user. 56 // by the user.
53 void OnNeverForThisSiteClicked(); 57 void OnNeverForThisSiteClicked();
54 58
55 // Called by the view code when the save button is clicked by the user. 59 // Called by the view code when the save button is clicked by the user.
56 void OnSaveClicked(); 60 void OnSaveClicked();
57 61
58 // Called by the view code when the update link is clicked by the user. 62 // Called by the view code when the update link is clicked by the user.
59 void OnUpdateClicked(const autofill::PasswordForm& password_form); 63 void OnUpdateClicked(const autofill::PasswordForm& password_form);
60 64
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 145
142 // State setter. 146 // State setter.
143 void set_state(password_manager::ui::State state) { state_ = state; } 147 void set_state(password_manager::ui::State state) { state_ = state; }
144 #endif 148 #endif
145 149
146 // Upper limits on the size of the username and password fields. 150 // Upper limits on the size of the username and password fields.
147 static int UsernameFieldWidth(); 151 static int UsernameFieldWidth();
148 static int PasswordFieldWidth(); 152 static int PasswordFieldWidth();
149 153
150 private: 154 private:
155 enum UserBehaviorOnUpdateBubble {
156 UPDATE_CLICKED,
157 NOPE_CLICKED,
158 NO_INTERACTION
159 };
151 // Updates |title_| and |title_brand_link_range_| for the 160 // Updates |title_| and |title_brand_link_range_| for the
152 // PENDING_PASSWORD_STATE. 161 // PENDING_PASSWORD_STATE.
153 void UpdatePendingStateTitle(); 162 void UpdatePendingStateTitle();
163 password_manager::metrics_util::UpdatePasswordSubmissionEvent
164 GetUpdateDismissalReason(UserBehaviorOnUpdateBubble behavior) const;
154 // URL of the page from where this bubble was triggered. 165 // URL of the page from where this bubble was triggered.
155 GURL origin_; 166 GURL origin_;
156 password_manager::ui::State state_; 167 password_manager::ui::State state_;
157 base::string16 title_; 168 base::string16 title_;
158 // Range of characters in the title that contains the Smart Lock Brand and 169 // Range of characters in the title that contains the Smart Lock Brand and
159 // should point to an article. For the default title the range is empty. 170 // should point to an article. For the default title the range is empty.
160 gfx::Range title_brand_link_range_; 171 gfx::Range title_brand_link_range_;
161 autofill::PasswordForm pending_password_; 172 autofill::PasswordForm pending_password_;
162 bool password_overridden_; 173 bool password_overridden_;
163 ScopedVector<const autofill::PasswordForm> local_credentials_; 174 ScopedVector<const autofill::PasswordForm> local_credentials_;
164 ScopedVector<const autofill::PasswordForm> federated_credentials_; 175 ScopedVector<const autofill::PasswordForm> federated_credentials_;
165 base::string16 manage_link_; 176 base::string16 manage_link_;
166 base::string16 save_confirmation_text_; 177 base::string16 save_confirmation_text_;
167 gfx::Range save_confirmation_link_range_; 178 gfx::Range save_confirmation_link_range_;
168 password_manager::metrics_util::UIDisplayDisposition display_disposition_; 179 password_manager::metrics_util::UIDisplayDisposition display_disposition_;
169 password_manager::metrics_util::UIDismissalReason dismissal_reason_; 180 password_manager::metrics_util::UIDismissalReason dismissal_reason_;
181 password_manager::metrics_util::UpdatePasswordSubmissionEvent
182 update_password_submission_event_;
170 183
171 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel); 184 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleModel);
172 }; 185 };
173 186
174 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_ 187 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_MODEL_H_
OLDNEW
« 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