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

Side by Side Diff: components/autofill/common/password_generation_util.cc

Issue 16879006: In components/autofill, move common/ to core/common/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to fix conflict Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "components/autofill/common/password_generation_util.h"
6
7 #include "base/metrics/histogram.h"
8
9 namespace autofill {
10 namespace password_generation {
11
12 PasswordGenerationActions::PasswordGenerationActions()
13 : learn_more_visited(false),
14 password_accepted(false),
15 password_edited(false),
16 password_regenerated(false) {
17 }
18
19 PasswordGenerationActions::~PasswordGenerationActions() {
20 }
21
22 void LogUserActions(PasswordGenerationActions actions) {
23 UserAction action = IGNORE_FEATURE;
24 if (actions.password_accepted) {
25 if (actions.password_edited)
26 action = ACCEPT_AFTER_EDITING;
27 else
28 action = ACCEPT_ORIGINAL_PASSWORD;
29 } else if (actions.learn_more_visited) {
30 action = LEARN_MORE;
31 }
32 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.UserActions",
33 action, ACTION_ENUM_COUNT);
34 }
35
36 void LogPasswordGenerationEvent(PasswordGenerationEvent event) {
37 UMA_HISTOGRAM_ENUMERATION("PasswordGeneration.Event",
38 event, EVENT_ENUM_COUNT);
39 }
40
41 } // namespace password_generation
42 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/common/password_generation_util.h ('k') | components/autofill/common/web_element_descriptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698