| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_25, | 25 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_25, |
| 26 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15_MIN_FORM_SCORE_5, | 26 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15_MIN_FORM_SCORE_5, |
| 27 TOOLBAR_DATA_ONLY, | 27 TOOLBAR_DATA_ONLY, |
| 28 ACCEPTANCE_RATIO_04_WINNER_LEAD_RATIO_3_MIN_FORM_SCORE_4, | 28 ACCEPTANCE_RATIO_04_WINNER_LEAD_RATIO_3_MIN_FORM_SCORE_4, |
| 29 NO_SERVER_RESPONSE, | 29 NO_SERVER_RESPONSE, |
| 30 PROBABILITY_PICKER_05, | 30 PROBABILITY_PICKER_05, |
| 31 PROBABILITY_PICKER_025, | 31 PROBABILITY_PICKER_025, |
| 32 PROBABILITY_PICKER_025_CC_THRESHOLD_03, | 32 PROBABILITY_PICKER_025_CC_THRESHOLD_03, |
| 33 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03, | 33 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03, |
| 34 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK, | 34 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK, |
| 35 PROBABILITY_PICKER_05_CC_NAME_THRESHOLD_03_EXPERIMENT_1, |
| 35 NUM_SERVER_EXPERIMENTS | 36 NUM_SERVER_EXPERIMENTS |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 enum FieldTypeGroupForMetrics { | 39 enum FieldTypeGroupForMetrics { |
| 39 AMBIGUOUS = 0, | 40 AMBIGUOUS = 0, |
| 40 NAME, | 41 NAME, |
| 41 COMPANY, | 42 COMPANY, |
| 42 ADDRESS_LINE_1, | 43 ADDRESS_LINE_1, |
| 43 ADDRESS_LINE_2, | 44 ADDRESS_LINE_2, |
| 44 ADDRESS_CITY, | 45 ADDRESS_CITY, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 else if (experiment_id == "fp05") | 229 else if (experiment_id == "fp05") |
| 229 metric = PROBABILITY_PICKER_05; | 230 metric = PROBABILITY_PICKER_05; |
| 230 else if (experiment_id == "fp025") | 231 else if (experiment_id == "fp025") |
| 231 metric = PROBABILITY_PICKER_025; | 232 metric = PROBABILITY_PICKER_025; |
| 232 else if (experiment_id == "fp05cc03") | 233 else if (experiment_id == "fp05cc03") |
| 233 metric = PROBABILITY_PICKER_025_CC_THRESHOLD_03; | 234 metric = PROBABILITY_PICKER_025_CC_THRESHOLD_03; |
| 234 else if (experiment_id == "fp05cco03") | 235 else if (experiment_id == "fp05cco03") |
| 235 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03; | 236 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03; |
| 236 else if (experiment_id == "fp05cco03cstd") | 237 else if (experiment_id == "fp05cco03cstd") |
| 237 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK; | 238 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK; |
| 239 else if (experiment_id == "fp05cc03e1") |
| 240 metric = PROBABILITY_PICKER_05_CC_NAME_THRESHOLD_03_EXPERIMENT_1; |
| 238 | 241 |
| 239 DCHECK(metric < NUM_SERVER_EXPERIMENTS); | 242 DCHECK(metric < NUM_SERVER_EXPERIMENTS); |
| 240 LogUMAHistogramEnumeration(histogram_name, metric, NUM_SERVER_EXPERIMENTS); | 243 LogUMAHistogramEnumeration(histogram_name, metric, NUM_SERVER_EXPERIMENTS); |
| 241 } | 244 } |
| 242 | 245 |
| 243 } // namespace | 246 } // namespace |
| 244 | 247 |
| 245 AutofillMetrics::AutofillMetrics() { | 248 AutofillMetrics::AutofillMetrics() { |
| 246 } | 249 } |
| 247 | 250 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 366 |
| 364 void AutofillMetrics::LogServerExperimentIdForQuery( | 367 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 365 const std::string& experiment_id) const { | 368 const std::string& experiment_id) const { |
| 366 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 369 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 367 } | 370 } |
| 368 | 371 |
| 369 void AutofillMetrics::LogServerExperimentIdForUpload( | 372 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 370 const std::string& experiment_id) const { | 373 const std::string& experiment_id) const { |
| 371 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 374 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 372 } | 375 } |
| OLD | NEW |