Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ |
| 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ | 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 // Baseline metric: The dialog was shown. | 57 // Baseline metric: The dialog was shown. |
| 58 SECURITY_METRIC_DIALOG_SHOWN = 0, | 58 SECURITY_METRIC_DIALOG_SHOWN = 0, |
| 59 // Credit card requested over non-secure protocol. | 59 // Credit card requested over non-secure protocol. |
| 60 SECURITY_METRIC_CREDIT_CARD_OVER_HTTP, | 60 SECURITY_METRIC_CREDIT_CARD_OVER_HTTP, |
| 61 // Autocomplete data requested from a frame hosted on an origin not matching | 61 // Autocomplete data requested from a frame hosted on an origin not matching |
| 62 // the main frame's origin. | 62 // the main frame's origin. |
| 63 SECURITY_METRIC_CROSS_ORIGIN_FRAME, | 63 SECURITY_METRIC_CROSS_ORIGIN_FRAME, |
| 64 NUM_DIALOG_SECURITY_METRICS | 64 NUM_DIALOG_SECURITY_METRICS |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 // The initial state of user that's interacting with a freshly shown | |
| 68 // requestAutocomplete or Autocheckout dialog. | |
| 69 enum DialogInitialUserStateMetric { | |
| 70 // User not signed in, no verified Autofill profiles. | |
| 71 DIALOG_NEW_USER_NOT_SIGNED_IN = 0, | |
|
Dan Beam
2013/03/07 17:16:50
is a user "new" if this is their *first* (and only
Ilya Sherman
2013/03/09 01:58:57
No, it's as the comment says. Do you have a diffe
| |
| 72 // User signed in, no Wallet items, no verified Autofill profiles. | |
| 73 DIALOG_NEW_USER_SIGNED_IN, | |
| 74 // User signed in, no Wallet items, but 1+ verified Autofill profiles. | |
|
Dan Beam
2013/03/07 17:16:50
nit: if you could change "1+" to something that do
Ilya Sherman
2013/03/09 01:58:57
Done.
| |
| 75 DIALOG_AUTOFILL_USER_SIGNED_IN, | |
| 76 // User signed in, 1+ Wallet items. | |
| 77 DIALOG_WALLET_USER_SIGNED_IN, | |
| 78 // User not signed in, but 1+ verified Autofill profiles. | |
| 79 DIALOG_AUTOFILL_USER_NOT_SIGNED_IN, | |
| 80 NUM_DIALOG_INITIAL_USER_STATE_METRICS | |
| 81 }; | |
| 82 | |
| 67 enum InfoBarMetric { | 83 enum InfoBarMetric { |
| 68 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit | 84 INFOBAR_SHOWN = 0, // We showed an infobar, e.g. prompting to save credit |
| 69 // card info. | 85 // card info. |
| 70 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar. | 86 INFOBAR_ACCEPTED, // The user explicitly accepted the infobar. |
| 71 INFOBAR_DENIED, // The user explicitly denied the infobar. | 87 INFOBAR_DENIED, // The user explicitly denied the infobar. |
| 72 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on | 88 INFOBAR_IGNORED, // The user completely ignored the infobar (logged on |
| 73 // tab close). | 89 // tab close). |
| 74 NUM_INFO_BAR_METRICS, | 90 NUM_INFO_BAR_METRICS, |
| 75 }; | 91 }; |
| 76 | 92 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 // This should be called when the requestAutocomplete dialog, invoked by a | 256 // This should be called when the requestAutocomplete dialog, invoked by a |
| 241 // dialog of type |dialog_type|, is closed. |duration| should be the time | 257 // dialog of type |dialog_type|, is closed. |duration| should be the time |
| 242 // elapsed between the dialog being shown and it being closed. | 258 // elapsed between the dialog being shown and it being closed. |
| 243 // |dismissal_action| should indicate whether the user dismissed the dialog by | 259 // |dismissal_action| should indicate whether the user dismissed the dialog by |
| 244 // submitting the form data or by cancelling. | 260 // submitting the form data or by cancelling. |
| 245 virtual void LogDialogUiDuration( | 261 virtual void LogDialogUiDuration( |
| 246 const base::TimeDelta& duration, | 262 const base::TimeDelta& duration, |
| 247 autofill::DialogType dialog_type, | 263 autofill::DialogType dialog_type, |
| 248 DialogDismissalAction dismissal_action) const; | 264 DialogDismissalAction dismissal_action) const; |
| 249 | 265 |
| 266 // This should be called as soon as the user's signed-in status and Wallet | |
| 267 // item count is known. Records that a starting out in |user_state| is | |
| 268 // interacting with a dialog of |dialog_type|. | |
| 269 virtual void LogDialogInitialUserState( | |
| 270 autofill::DialogType dialog_type, | |
| 271 DialogInitialUserStateMetric user_type) const; | |
| 272 | |
| 250 // For tracking Wallet errors that occur while a dialog of type |dialog_type| | 273 // For tracking Wallet errors that occur while a dialog of type |dialog_type| |
| 251 // is showing. | 274 // is showing. |
| 252 virtual void LogWalletErrorMetric(autofill::DialogType dialog_type, | 275 virtual void LogWalletErrorMetric(autofill::DialogType dialog_type, |
| 253 WalletErrorMetric metric) const; | 276 WalletErrorMetric metric) const; |
| 254 | 277 |
| 255 // For tracking Wallet responses including the given |required_action| that | 278 // For tracking Wallet responses including the given |required_action| that |
| 256 // occur while a dialog of type |dialog_type| is showing. | 279 // occur while a dialog of type |dialog_type| is showing. |
| 257 virtual void LogWalletRequiredAction( | 280 virtual void LogWalletRequiredAction( |
| 258 autofill::DialogType dialog_type, | 281 autofill::DialogType dialog_type, |
| 259 WalletRequiredAction required_action) const; | 282 WalletRequiredAction required_action) const; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 | 327 |
| 305 // Logs the experiment id corresponding to an upload to the server. | 328 // Logs the experiment id corresponding to an upload to the server. |
| 306 virtual void LogServerExperimentIdForUpload( | 329 virtual void LogServerExperimentIdForUpload( |
| 307 const std::string& experiment_id) const; | 330 const std::string& experiment_id) const; |
| 308 | 331 |
| 309 private: | 332 private: |
| 310 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics); | 333 DISALLOW_COPY_AND_ASSIGN(AutofillMetrics); |
| 311 }; | 334 }; |
| 312 | 335 |
| 313 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ | 336 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_METRICS_H_ |
| OLD | NEW |