Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/password_generation_status.h" | |
| 6 | |
| 7 #include "base/metrics/histogram.h" | |
| 8 | |
| 9 namespace password_generation { | |
| 10 | |
| 11 PasswordGenerationActions::PasswordGenerationActions() | |
| 12 : learn_more_visited(false), | |
| 13 password_accepted(false), | |
| 14 password_edited(false), | |
| 15 password_regenerated(false) { | |
| 16 } | |
| 17 | |
| 18 PasswordGenerationActions::~PasswordGenerationActions() { | |
| 19 } | |
| 20 | |
| 21 void UpdateUserActionsHistogram(PasswordGenerationActions actions) { | |
| 22 if (actions.password_accepted) { | |
| 23 if (actions.password_edited) | |
| 24 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.UserActions", | |
| 25 ACCEPT_AFTER_EDITING, ACTION_ENUM_COUNT); | |
|
Ilya Sherman
2012/07/18 20:48:56
nit: The "UMA_HISTOGRAM_ENUMERATION" block is repe
zysxqn
2012/07/18 22:46:17
Done.
| |
| 26 else | |
| 27 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.UserActions", | |
| 28 ACCEPT_ORIGINAL_PASSWORD, ACTION_ENUM_COUNT); | |
| 29 } else if (actions.learn_more_visited) { | |
| 30 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.UserActions", | |
| 31 LEARN_MORE, ACTION_ENUM_COUNT); | |
| 32 } else { | |
| 33 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.UserActions", | |
| 34 IGNORE, ACTION_ENUM_COUNT); | |
| 35 } | |
| 36 } | |
| 37 | |
| 38 void UpdateEventsHistogram(PasswordGenerationEvent event) { | |
| 39 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.Events", | |
| 40 event, EVENT_ENUM_COUNT); | |
| 41 } | |
| 42 | |
| 43 } // namespace password_generation | |
| OLD | NEW |