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

Side by Side Diff: chrome/browser/autofill/autofill_metrics.cc

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix. Created 9 years, 3 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/autofill/autofill_metrics.h" 5 #include "chrome/browser/autofill/autofill_metrics.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/browser/autofill/autofill_type.h" 10 #include "chrome/browser/autofill/autofill_type.h"
(...skipping 24 matching lines...) Expand all
35 AMBIGUOUS = 0, 35 AMBIGUOUS = 0,
36 NAME, 36 NAME,
37 COMPANY, 37 COMPANY,
38 ADDRESS_LINE_1, 38 ADDRESS_LINE_1,
39 ADDRESS_LINE_2, 39 ADDRESS_LINE_2,
40 ADDRESS_CITY, 40 ADDRESS_CITY,
41 ADDRESS_STATE, 41 ADDRESS_STATE,
42 ADDRESS_ZIP, 42 ADDRESS_ZIP,
43 ADDRESS_COUNTRY, 43 ADDRESS_COUNTRY,
44 PHONE, 44 PHONE,
45 FAX, 45 FAX, // Deprecated.
46 EMAIL, 46 EMAIL,
47 CREDIT_CARD_NAME, 47 CREDIT_CARD_NAME,
48 CREDIT_CARD_NUMBER, 48 CREDIT_CARD_NUMBER,
49 CREDIT_CARD_DATE, 49 CREDIT_CARD_DATE,
50 NUM_FIELD_TYPE_GROUPS_FOR_METRICS 50 NUM_FIELD_TYPE_GROUPS_FOR_METRICS
51 }; 51 };
52 52
53 // First, translates |field_type| to the corresponding logical |group| from 53 // First, translates |field_type| to the corresponding logical |group| from
54 // |FieldTypeGroupForMetrics|. Then, interpolates this with the given |metric|, 54 // |FieldTypeGroupForMetrics|. Then, interpolates this with the given |metric|,
55 // which should be in the range [0, |num_possible_metrics|). 55 // which should be in the range [0, |num_possible_metrics|).
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 break; 117 break;
118 118
119 case AutofillType::EMAIL: 119 case AutofillType::EMAIL:
120 group = EMAIL; 120 group = EMAIL;
121 break; 121 break;
122 122
123 case AutofillType::PHONE_HOME: 123 case AutofillType::PHONE_HOME:
124 group = PHONE; 124 group = PHONE;
125 break; 125 break;
126 126
127 case AutofillType::PHONE_FAX:
128 group = FAX;
129 break;
130
131 case AutofillType::CREDIT_CARD: 127 case AutofillType::CREDIT_CARD:
132 switch (field_type) { 128 switch (field_type) {
133 case ::CREDIT_CARD_NAME: 129 case ::CREDIT_CARD_NAME:
134 group = CREDIT_CARD_NAME; 130 group = CREDIT_CARD_NAME;
135 break; 131 break;
136 case ::CREDIT_CARD_NUMBER: 132 case ::CREDIT_CARD_NUMBER:
137 group = CREDIT_CARD_NUMBER; 133 group = CREDIT_CARD_NUMBER;
138 break; 134 break;
139 default: 135 default:
140 group = CREDIT_CARD_DATE; 136 group = CREDIT_CARD_DATE;
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 351
356 void AutofillMetrics::LogServerExperimentIdForQuery( 352 void AutofillMetrics::LogServerExperimentIdForQuery(
357 const std::string& experiment_id) const { 353 const std::string& experiment_id) const {
358 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); 354 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id);
359 } 355 }
360 356
361 void AutofillMetrics::LogServerExperimentIdForUpload( 357 void AutofillMetrics::LogServerExperimentIdForUpload(
362 const std::string& experiment_id) const { 358 const std::string& experiment_id) const {
363 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); 359 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id);
364 } 360 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_merge_unittest.cc ('k') | chrome/browser/autofill/autofill_metrics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698