| 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 10 matching lines...) Expand all Loading... |
| 21 ACCEPTANCE_RATIO_1, | 21 ACCEPTANCE_RATIO_1, |
| 22 ACCEPTANCE_RATIO_2, | 22 ACCEPTANCE_RATIO_2, |
| 23 ACCEPTANCE_RATIO_4, | 23 ACCEPTANCE_RATIO_4, |
| 24 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15, | 24 ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15, |
| 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, |
| 32 PROBABILITY_PICKER_025_CC_THRESHOLD_03, |
| 33 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03, |
| 34 PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK, |
| 31 NUM_SERVER_EXPERIMENTS | 35 NUM_SERVER_EXPERIMENTS |
| 32 }; | 36 }; |
| 33 | 37 |
| 34 enum FieldTypeGroupForMetrics { | 38 enum FieldTypeGroupForMetrics { |
| 35 AMBIGUOUS = 0, | 39 AMBIGUOUS = 0, |
| 36 NAME, | 40 NAME, |
| 37 COMPANY, | 41 COMPANY, |
| 38 ADDRESS_LINE_1, | 42 ADDRESS_LINE_1, |
| 39 ADDRESS_LINE_2, | 43 ADDRESS_LINE_2, |
| 40 ADDRESS_CITY, | 44 ADDRESS_CITY, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 else if (experiment_id == "ar05wr15fs5") | 220 else if (experiment_id == "ar05wr15fs5") |
| 217 metric = ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15_MIN_FORM_SCORE_5; | 221 metric = ACCEPTANCE_RATIO_05_WINNER_LEAD_RATIO_15_MIN_FORM_SCORE_5; |
| 218 else if (experiment_id == "tbar1") | 222 else if (experiment_id == "tbar1") |
| 219 metric = TOOLBAR_DATA_ONLY; | 223 metric = TOOLBAR_DATA_ONLY; |
| 220 else if (experiment_id == "ar04wr3fs4") | 224 else if (experiment_id == "ar04wr3fs4") |
| 221 metric = ACCEPTANCE_RATIO_04_WINNER_LEAD_RATIO_3_MIN_FORM_SCORE_4; | 225 metric = ACCEPTANCE_RATIO_04_WINNER_LEAD_RATIO_3_MIN_FORM_SCORE_4; |
| 222 else if (experiment_id == default_experiment_name) | 226 else if (experiment_id == default_experiment_name) |
| 223 metric = NO_SERVER_RESPONSE; | 227 metric = NO_SERVER_RESPONSE; |
| 224 else if (experiment_id == "fp05") | 228 else if (experiment_id == "fp05") |
| 225 metric = PROBABILITY_PICKER_05; | 229 metric = PROBABILITY_PICKER_05; |
| 230 else if (experiment_id == "fp025") |
| 231 metric = PROBABILITY_PICKER_025; |
| 232 else if (experiment_id == "fp05cc03") |
| 233 metric = PROBABILITY_PICKER_025_CC_THRESHOLD_03; |
| 234 else if (experiment_id == "fp05cco03") |
| 235 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03; |
| 236 else if (experiment_id == "fp05cco03cstd") |
| 237 metric = PROBABILITY_PICKER_025_CONTEXTUAL_CC_THRESHOLD_03_WITH_FALLBACK; |
| 226 | 238 |
| 227 DCHECK(metric < NUM_SERVER_EXPERIMENTS); | 239 DCHECK(metric < NUM_SERVER_EXPERIMENTS); |
| 228 LogUMAHistogramEnumeration(histogram_name, metric, NUM_SERVER_EXPERIMENTS); | 240 LogUMAHistogramEnumeration(histogram_name, metric, NUM_SERVER_EXPERIMENTS); |
| 229 } | 241 } |
| 230 | 242 |
| 231 } // namespace | 243 } // namespace |
| 232 | 244 |
| 233 AutofillMetrics::AutofillMetrics() { | 245 AutofillMetrics::AutofillMetrics() { |
| 234 } | 246 } |
| 235 | 247 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 363 |
| 352 void AutofillMetrics::LogServerExperimentIdForQuery( | 364 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 353 const std::string& experiment_id) const { | 365 const std::string& experiment_id) const { |
| 354 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 366 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 355 } | 367 } |
| 356 | 368 |
| 357 void AutofillMetrics::LogServerExperimentIdForUpload( | 369 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 358 const std::string& experiment_id) const { | 370 const std::string& experiment_id) const { |
| 359 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 371 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 360 } | 372 } |
| OLD | NEW |