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 #include "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/autofill_metrics.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 GROUP_COMPANY, | 24 GROUP_COMPANY, |
25 GROUP_ADDRESS_LINE_1, | 25 GROUP_ADDRESS_LINE_1, |
26 GROUP_ADDRESS_LINE_2, | 26 GROUP_ADDRESS_LINE_2, |
27 GROUP_ADDRESS_CITY, | 27 GROUP_ADDRESS_CITY, |
28 GROUP_ADDRESS_STATE, | 28 GROUP_ADDRESS_STATE, |
29 GROUP_ADDRESS_ZIP, | 29 GROUP_ADDRESS_ZIP, |
30 GROUP_ADDRESS_COUNTRY, | 30 GROUP_ADDRESS_COUNTRY, |
31 GROUP_PHONE, | 31 GROUP_PHONE, |
32 GROUP_FAX, // Deprecated. | 32 GROUP_FAX, // Deprecated. |
33 GROUP_EMAIL, | 33 GROUP_EMAIL, |
34 GROUP_CREDIT_CARD_NAME, | 34 GROUP_CREDIT_CARD_NAME_FULL, |
35 GROUP_CREDIT_CARD_NUMBER, | 35 GROUP_CREDIT_CARD_NUMBER, |
36 GROUP_CREDIT_CARD_DATE, | 36 GROUP_CREDIT_CARD_DATE, |
37 GROUP_CREDIT_CARD_TYPE, | 37 GROUP_CREDIT_CARD_TYPE, |
38 GROUP_PASSWORD, | 38 GROUP_PASSWORD, |
39 GROUP_ADDRESS_LINE_3, | 39 GROUP_ADDRESS_LINE_3, |
40 GROUP_USERNAME, | 40 GROUP_USERNAME, |
41 NUM_FIELD_TYPE_GROUPS_FOR_METRICS | 41 NUM_FIELD_TYPE_GROUPS_FOR_METRICS |
42 }; | 42 }; |
43 | 43 |
44 } // namespace | 44 } // namespace |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 group = GROUP_EMAIL; | 122 group = GROUP_EMAIL; |
123 break; | 123 break; |
124 | 124 |
125 case PHONE_HOME: | 125 case PHONE_HOME: |
126 case PHONE_BILLING: | 126 case PHONE_BILLING: |
127 group = GROUP_PHONE; | 127 group = GROUP_PHONE; |
128 break; | 128 break; |
129 | 129 |
130 case CREDIT_CARD: | 130 case CREDIT_CARD: |
131 switch (field_type) { | 131 switch (field_type) { |
132 case CREDIT_CARD_NAME: | 132 case CREDIT_CARD_NAME_FULL: |
133 group = GROUP_CREDIT_CARD_NAME; | 133 group = GROUP_CREDIT_CARD_NAME_FULL; |
134 break; | 134 break; |
135 case CREDIT_CARD_NUMBER: | 135 case CREDIT_CARD_NUMBER: |
136 group = GROUP_CREDIT_CARD_NUMBER; | 136 group = GROUP_CREDIT_CARD_NUMBER; |
137 break; | 137 break; |
138 case CREDIT_CARD_TYPE: | 138 case CREDIT_CARD_TYPE: |
139 group = GROUP_CREDIT_CARD_TYPE; | 139 group = GROUP_CREDIT_CARD_TYPE; |
140 break; | 140 break; |
141 case CREDIT_CARD_EXP_MONTH: | 141 case CREDIT_CARD_EXP_MONTH: |
142 case CREDIT_CARD_EXP_2_DIGIT_YEAR: | 142 case CREDIT_CARD_EXP_2_DIGIT_YEAR: |
143 case CREDIT_CARD_EXP_4_DIGIT_YEAR: | 143 case CREDIT_CARD_EXP_4_DIGIT_YEAR: |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 else if (is_server_data_available_ && !is_local_data_available_) | 840 else if (is_server_data_available_ && !is_local_data_available_) |
841 name += ".WithOnlyServerData"; | 841 name += ".WithOnlyServerData"; |
842 else if (!is_server_data_available_ && is_local_data_available_) | 842 else if (!is_server_data_available_ && is_local_data_available_) |
843 name += ".WithOnlyLocalData"; | 843 name += ".WithOnlyLocalData"; |
844 else | 844 else |
845 name += ".WithBothServerAndLocalData"; | 845 name += ".WithBothServerAndLocalData"; |
846 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); | 846 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); |
847 } | 847 } |
848 | 848 |
849 } // namespace autofill | 849 } // namespace autofill |
OLD | NEW |