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

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

Issue 8680040: Group forms-related files in webkit/glue in a forms/ subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + another build fix Created 9 years 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"
11 #include "chrome/browser/autofill/form_structure.h" 11 #include "chrome/browser/autofill/form_structure.h"
12 #include "webkit/glue/form_data.h" 12 #include "webkit/forms/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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 LogUMAHistogramEnumeration(sub_histogram_name, 195 LogUMAHistogramEnumeration(sub_histogram_name,
196 field_type_group_metric, 196 field_type_group_metric,
197 num_field_type_group_metrics); 197 num_field_type_group_metrics);
198 } 198 }
199 199
200 void LogServerExperimentId(const std::string& histogram_name, 200 void LogServerExperimentId(const std::string& histogram_name,
201 const std::string& experiment_id) { 201 const std::string& experiment_id) {
202 ServerExperiment metric = UNKNOWN_EXPERIMENT; 202 ServerExperiment metric = UNKNOWN_EXPERIMENT;
203 203
204 const std::string default_experiment_name = 204 const std::string default_experiment_name =
205 FormStructure(webkit_glue::FormData()).server_experiment_id(); 205 FormStructure(webkit::forms::FormData()).server_experiment_id();
206 if (experiment_id.empty()) 206 if (experiment_id.empty())
207 metric = NO_EXPERIMENT; 207 metric = NO_EXPERIMENT;
208 else if (experiment_id == "ar06") 208 else if (experiment_id == "ar06")
209 metric = ACCEPTANCE_RATIO_06; 209 metric = ACCEPTANCE_RATIO_06;
210 else if (experiment_id == "ar1") 210 else if (experiment_id == "ar1")
211 metric = ACCEPTANCE_RATIO_1; 211 metric = ACCEPTANCE_RATIO_1;
212 else if (experiment_id == "ar2") 212 else if (experiment_id == "ar2")
213 metric = ACCEPTANCE_RATIO_2; 213 metric = ACCEPTANCE_RATIO_2;
214 else if (experiment_id == "ar4") 214 else if (experiment_id == "ar4")
215 metric = ACCEPTANCE_RATIO_4; 215 metric = ACCEPTANCE_RATIO_4;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 363
364 void AutofillMetrics::LogServerExperimentIdForQuery( 364 void AutofillMetrics::LogServerExperimentIdForQuery(
365 const std::string& experiment_id) const { 365 const std::string& experiment_id) const {
366 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); 366 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id);
367 } 367 }
368 368
369 void AutofillMetrics::LogServerExperimentIdForUpload( 369 void AutofillMetrics::LogServerExperimentIdForUpload(
370 const std::string& experiment_id) const { 370 const std::string& experiment_id) const {
371 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); 371 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id);
372 } 372 }
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