| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 LogUMAHistogramEnumeration(sub_histogram_name, | 199 LogUMAHistogramEnumeration(sub_histogram_name, |
| 200 field_type_group_metric, | 200 field_type_group_metric, |
| 201 num_field_type_group_metrics); | 201 num_field_type_group_metrics); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void LogServerExperimentId(const std::string& histogram_name, | 204 void LogServerExperimentId(const std::string& histogram_name, |
| 205 const std::string& experiment_id) { | 205 const std::string& experiment_id) { |
| 206 ServerExperiment metric = UNKNOWN_EXPERIMENT; | 206 ServerExperiment metric = UNKNOWN_EXPERIMENT; |
| 207 | 207 |
| 208 const std::string default_experiment_name = | 208 const std::string default_experiment_name = |
| 209 FormStructure(FormData()).server_experiment_id(); | 209 FormStructure(FormData(), false).server_experiment_id(); |
| 210 if (experiment_id.empty()) | 210 if (experiment_id.empty()) |
| 211 metric = NO_EXPERIMENT; | 211 metric = NO_EXPERIMENT; |
| 212 else if (experiment_id == "ar06") | 212 else if (experiment_id == "ar06") |
| 213 metric = ACCEPTANCE_RATIO_06; | 213 metric = ACCEPTANCE_RATIO_06; |
| 214 else if (experiment_id == "ar1") | 214 else if (experiment_id == "ar1") |
| 215 metric = ACCEPTANCE_RATIO_1; | 215 metric = ACCEPTANCE_RATIO_1; |
| 216 else if (experiment_id == "ar2") | 216 else if (experiment_id == "ar2") |
| 217 metric = ACCEPTANCE_RATIO_2; | 217 metric = ACCEPTANCE_RATIO_2; |
| 218 else if (experiment_id == "ar4") | 218 else if (experiment_id == "ar4") |
| 219 metric = ACCEPTANCE_RATIO_4; | 219 metric = ACCEPTANCE_RATIO_4; |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 | 384 |
| 385 void AutofillMetrics::LogServerExperimentIdForQuery( | 385 void AutofillMetrics::LogServerExperimentIdForQuery( |
| 386 const std::string& experiment_id) const { | 386 const std::string& experiment_id) const { |
| 387 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 387 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 388 } | 388 } |
| 389 | 389 |
| 390 void AutofillMetrics::LogServerExperimentIdForUpload( | 390 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 391 const std::string& experiment_id) const { | 391 const std::string& experiment_id) const { |
| 392 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 392 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 393 } | 393 } |
| OLD | NEW |