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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 // triggered. Only one of the following four will be triggered per page | 274 // triggered. Only one of the following four will be triggered per page |
| 275 // load. | 275 // load. |
| 276 FORM_EVENT_NO_SUGGESTION_SUBMITTED_ONCE, | 276 FORM_EVENT_NO_SUGGESTION_SUBMITTED_ONCE, |
| 277 FORM_EVENT_LOCAL_SUGGESTION_SUBMITTED_ONCE, | 277 FORM_EVENT_LOCAL_SUGGESTION_SUBMITTED_ONCE, |
| 278 FORM_EVENT_SERVER_SUGGESTION_SUBMITTED_ONCE, | 278 FORM_EVENT_SERVER_SUGGESTION_SUBMITTED_ONCE, |
| 279 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SUBMITTED_ONCE, | 279 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SUBMITTED_ONCE, |
| 280 // A masked server card suggestion was selected to fill the form. | 280 // A masked server card suggestion was selected to fill the form. |
| 281 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED, | 281 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED, |
| 282 // Same as above but only triggered once per page load. | 282 // Same as above but only triggered once per page load. |
| 283 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED_ONCE, | 283 FORM_EVENT_MASKED_SERVER_CARD_SUGGESTION_SELECTED_ONCE, |
| 284 // An autofillable form is about to be submitted. If the submission is not | |
| 285 // interrupted by JavaScript, the "form submitted" events below will also be | |
|
Ilya Sherman
2015/03/23 20:58:16
nit: "below" -> "above"
Mathieu
2015/03/23 21:11:28
Done.
| |
| 286 // logged. Triggered once per page load. | |
|
Ilya Sherman
2015/03/23 20:58:17
nit: "once" -> "at most once"
Mathieu
2015/03/23 21:11:28
Done.
| |
| 287 FORM_EVENT_WILL_SUBMIT_ONCE, | |
| 288 | |
| 284 NUM_FORM_EVENTS, | 289 NUM_FORM_EVENTS, |
| 285 }; | 290 }; |
| 286 | 291 |
| 287 // Events related to the Unmask Credit Card Prompt. | 292 // Events related to the Unmask Credit Card Prompt. |
| 288 enum UnmaskPromptEvent { | 293 enum UnmaskPromptEvent { |
| 289 // The prompt was shown. | 294 // The prompt was shown. |
| 290 UNMASK_PROMPT_SHOWN = 0, | 295 UNMASK_PROMPT_SHOWN = 0, |
| 291 // The prompt was closed without attempting to unmask the card. | 296 // The prompt was closed without attempting to unmask the card. |
| 292 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS, | 297 UNMASK_PROMPT_CLOSED_NO_ATTEMPTS, |
| 293 // The prompt was closed without unmasking the card, but with at least | 298 // The prompt was closed without unmasking the card, but with at least |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 void OnDidShowSuggestions(); | 544 void OnDidShowSuggestions(); |
| 540 | 545 |
| 541 void OnDidSelectMaskedServerCardSuggestion(); | 546 void OnDidSelectMaskedServerCardSuggestion(); |
| 542 | 547 |
| 543 // In case of masked cards, caller must make sure this gets called before | 548 // In case of masked cards, caller must make sure this gets called before |
| 544 // the card is upgraded to a full card. | 549 // the card is upgraded to a full card. |
| 545 void OnDidFillSuggestion(const CreditCard& credit_card); | 550 void OnDidFillSuggestion(const CreditCard& credit_card); |
| 546 | 551 |
| 547 void OnDidFillSuggestion(const AutofillProfile& profile); | 552 void OnDidFillSuggestion(const AutofillProfile& profile); |
| 548 | 553 |
| 549 void OnDidSubmitForm(); | 554 void OnWillSubmitForm(); |
| 555 | |
| 556 void OnFormSubmitted(); | |
| 550 | 557 |
| 551 private: | 558 private: |
| 552 void Log(FormEvent event) const; | 559 void Log(FormEvent event) const; |
| 553 | 560 |
| 554 bool is_for_credit_card_; | 561 bool is_for_credit_card_; |
| 555 bool is_server_data_available_; | 562 bool is_server_data_available_; |
| 556 bool is_local_data_available_; | 563 bool is_local_data_available_; |
| 557 bool has_logged_interacted_; | 564 bool has_logged_interacted_; |
| 558 bool has_logged_suggestions_shown_; | 565 bool has_logged_suggestions_shown_; |
| 559 bool has_logged_masked_server_card_suggestion_selected_; | 566 bool has_logged_masked_server_card_suggestion_selected_; |
| 560 bool has_logged_suggestion_filled_; | 567 bool has_logged_suggestion_filled_; |
| 568 bool has_logged_will_submit_; | |
| 561 bool has_logged_submitted_; | 569 bool has_logged_submitted_; |
| 562 bool logged_suggestion_filled_was_server_data_; | 570 bool logged_suggestion_filled_was_server_data_; |
| 563 bool logged_suggestion_filled_was_masked_server_card_; | 571 bool logged_suggestion_filled_was_masked_server_card_; |
| 564 }; | 572 }; |
| 565 | 573 |
| 566 private: | 574 private: |
| 567 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); | 575 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); |
| 568 }; | 576 }; |
| 569 | 577 |
| 570 } // namespace autofill | 578 } // namespace autofill |
| 571 | 579 |
| 572 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ | 580 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ |
| OLD | NEW |