Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_metrics.h" | 5 #include "components/autofill/core/browser/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/time.h" | 9 #include "base/time/time.h" |
| 10 #include "components/autofill/core/browser/autofill_type.h" | 10 #include "components/autofill/core/browser/autofill_type.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 AutofillMetrics::WalletApiCallMetric metric) { | 175 AutofillMetrics::WalletApiCallMetric metric) { |
| 176 switch (metric) { | 176 switch (metric) { |
| 177 case AutofillMetrics::ACCEPT_LEGAL_DOCUMENTS: | 177 case AutofillMetrics::ACCEPT_LEGAL_DOCUMENTS: |
| 178 return "AcceptLegalDocuments"; | 178 return "AcceptLegalDocuments"; |
| 179 case AutofillMetrics::AUTHENTICATE_INSTRUMENT: | 179 case AutofillMetrics::AUTHENTICATE_INSTRUMENT: |
| 180 return "AuthenticateInstrument"; | 180 return "AuthenticateInstrument"; |
| 181 case AutofillMetrics::GET_FULL_WALLET: | 181 case AutofillMetrics::GET_FULL_WALLET: |
| 182 return "GetFullWallet"; | 182 return "GetFullWallet"; |
| 183 case AutofillMetrics::GET_WALLET_ITEMS: | 183 case AutofillMetrics::GET_WALLET_ITEMS: |
| 184 return "GetWalletItems"; | 184 return "GetWalletItems"; |
| 185 case AutofillMetrics::SAVE_ADDRESS: | 185 case AutofillMetrics::SAVE_TO_WALLET: |
| 186 return "SaveAddress"; | 186 return "SaveToWallet"; |
| 187 case AutofillMetrics::SAVE_INSTRUMENT: | |
| 188 return "SaveInstrument"; | |
| 189 case AutofillMetrics::SAVE_INSTRUMENT_AND_ADDRESS: | |
| 190 return "SaveInstrumentAndAddress"; | |
| 191 case AutofillMetrics::SEND_STATUS: | 187 case AutofillMetrics::SEND_STATUS: |
| 192 return "SendStatus"; | 188 return "SendStatus"; |
| 193 case AutofillMetrics::UPDATE_ADDRESS: | 189 case AutofillMetrics::DEPRECATED_SAVE_ADDRESS: |
|
ahutter
2013/07/02 21:56:54
Is this right or should it still map to the old st
Ilya Sherman
2013/07/02 22:13:42
This is fine, thanks :)
| |
| 194 return "UpdateAddress"; | 190 case AutofillMetrics::DEPRECATED_SAVE_INSTRUMENT: |
| 195 case AutofillMetrics::UPDATE_INSTRUMENT: | 191 case AutofillMetrics::DEPRECATED_SAVE_INSTRUMENT_AND_ADDRESS: |
| 196 return "UpdateInstrument"; | 192 case AutofillMetrics::DEPRECATED_UPDATE_ADDRESS: |
| 193 case AutofillMetrics::DEPRECATED_UPDATE_INSTRUMENT: | |
| 197 case AutofillMetrics::UNKNOWN_API_CALL: | 194 case AutofillMetrics::UNKNOWN_API_CALL: |
| 198 NOTREACHED(); | 195 NOTREACHED(); |
| 199 return "UnknownApiCall"; | 196 return "UnknownApiCall"; |
| 200 } | 197 } |
| 201 | 198 |
| 202 NOTREACHED(); | 199 NOTREACHED(); |
| 203 return "UnknownApiCall"; | 200 return "UnknownApiCall"; |
| 204 } | 201 } |
| 205 | 202 |
| 206 // A version of the UMA_HISTOGRAM_ENUMERATION macro that allows the |name| | 203 // A version of the UMA_HISTOGRAM_ENUMERATION macro that allows the |name| |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 597 const std::string& experiment_id) const { | 594 const std::string& experiment_id) const { |
| 598 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); | 595 LogServerExperimentId("Autofill.ServerExperimentId.Query", experiment_id); |
| 599 } | 596 } |
| 600 | 597 |
| 601 void AutofillMetrics::LogServerExperimentIdForUpload( | 598 void AutofillMetrics::LogServerExperimentIdForUpload( |
| 602 const std::string& experiment_id) const { | 599 const std::string& experiment_id) const { |
| 603 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); | 600 LogServerExperimentId("Autofill.ServerExperimentId.Upload", experiment_id); |
| 604 } | 601 } |
| 605 | 602 |
| 606 } // namespace autofill | 603 } // namespace autofill |
| OLD | NEW |