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

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

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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
OLDNEW
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"
11 #include "chrome/browser/autofill/form_structure.h" 11 #include "chrome/browser/autofill/form_structure.h"
12 #include "webkit/forms/form_data.h" 12 #include "chrome/common/form_data.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Server experiments we support. 16 // Server experiments we support.
17 enum ServerExperiment { 17 enum ServerExperiment {
18 NO_EXPERIMENT = 0, 18 NO_EXPERIMENT = 0,
19 UNKNOWN_EXPERIMENT, 19 UNKNOWN_EXPERIMENT,
20 ACCEPTANCE_RATIO_06, 20 ACCEPTANCE_RATIO_06,
21 ACCEPTANCE_RATIO_1, 21 ACCEPTANCE_RATIO_1,
22 ACCEPTANCE_RATIO_2, 22 ACCEPTANCE_RATIO_2,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 LogUMAHistogramEnumeration(sub_histogram_name, 196 LogUMAHistogramEnumeration(sub_histogram_name,
197 field_type_group_metric, 197 field_type_group_metric,
198 num_field_type_group_metrics); 198 num_field_type_group_metrics);
199 } 199 }
200 200
201 void LogServerExperimentId(const std::string& histogram_name, 201 void LogServerExperimentId(const std::string& histogram_name,
202 const std::string& experiment_id) { 202 const std::string& experiment_id) {
203 ServerExperiment metric = UNKNOWN_EXPERIMENT; 203 ServerExperiment metric = UNKNOWN_EXPERIMENT;
204 204
205 const std::string default_experiment_name = 205 const std::string default_experiment_name =
206 FormStructure(webkit::forms::FormData()).server_experiment_id(); 206 FormStructure(FormData()).server_experiment_id();
207 if (experiment_id.empty()) 207 if (experiment_id.empty())
208 metric = NO_EXPERIMENT; 208 metric = NO_EXPERIMENT;
209 else if (experiment_id == "ar06") 209 else if (experiment_id == "ar06")
210 metric = ACCEPTANCE_RATIO_06; 210 metric = ACCEPTANCE_RATIO_06;
211 else if (experiment_id == "ar1") 211 else if (experiment_id == "ar1")
212 metric = ACCEPTANCE_RATIO_1; 212 metric = ACCEPTANCE_RATIO_1;
213 else if (experiment_id == "ar2") 213 else if (experiment_id == "ar2")
214 metric = ACCEPTANCE_RATIO_2; 214 metric = ACCEPTANCE_RATIO_2;
215 else if (experiment_id == "ar4") 215 else if (experiment_id == "ar4")
216 metric = ACCEPTANCE_RATIO_4; 216 metric = ACCEPTANCE_RATIO_4;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 void AutofillMetrics::LogServerExperimentIdForQuery( 367 void AutofillMetrics::LogServerExperimentIdForQuery(
368 const std::string& experiment_id) const { 368 const std::string& experiment_id) const {
369 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); 369 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id);
370 } 370 }
371 371
372 void AutofillMetrics::LogServerExperimentIdForUpload( 372 void AutofillMetrics::LogServerExperimentIdForUpload(
373 const std::string& experiment_id) const { 373 const std::string& experiment_id) const {
374 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); 374 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id);
375 } 375 }
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