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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3754 form.fields.push_back(field); | 3754 form.fields.push_back(field); |
| 3755 | 3755 |
| 3756 field.label = ASCIIToUTF16("address"); | 3756 field.label = ASCIIToUTF16("address"); |
| 3757 field.name = ASCIIToUTF16("address"); | 3757 field.name = ASCIIToUTF16("address"); |
| 3758 form.fields.push_back(field); | 3758 form.fields.push_back(field); |
| 3759 | 3759 |
| 3760 // Checkable fields should be ignored in parsing | 3760 // Checkable fields should be ignored in parsing |
| 3761 FormFieldData checkable_field; | 3761 FormFieldData checkable_field; |
| 3762 checkable_field.label = ASCIIToUTF16("radio_button"); | 3762 checkable_field.label = ASCIIToUTF16("radio_button"); |
| 3763 checkable_field.form_control_type = "radio"; | 3763 checkable_field.form_control_type = "radio"; |
| 3764 checkable_field.is_checkable = true; | 3764 SetCheckStatus(&checkable_field, true, false); |
|
vabr (Chromium)
2016/06/06 12:39:30
Please assign directly:
checkable_field.check_stat
| |
| 3765 form.fields.push_back(checkable_field); | 3765 form.fields.push_back(checkable_field); |
| 3766 | 3766 |
| 3767 forms_.push_back(new FormStructure(form)); | 3767 forms_.push_back(new FormStructure(form)); |
| 3768 | 3768 |
| 3769 field.label = ASCIIToUTF16("email"); | 3769 field.label = ASCIIToUTF16("email"); |
| 3770 field.name = ASCIIToUTF16("email"); | 3770 field.name = ASCIIToUTF16("email"); |
| 3771 form.fields.push_back(field); | 3771 form.fields.push_back(field); |
| 3772 | 3772 |
| 3773 field.label = ASCIIToUTF16("password"); | 3773 field.label = ASCIIToUTF16("password"); |
| 3774 field.name = ASCIIToUTF16("password"); | 3774 field.name = ASCIIToUTF16("password"); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3880 EXPECT_THAT( | 3880 EXPECT_THAT( |
| 3881 histogram_tester.GetAllSamples("Autofill.ServerResponseHasDataForForm"), | 3881 histogram_tester.GetAllSamples("Autofill.ServerResponseHasDataForForm"), |
| 3882 ElementsAre(Bucket(true, 2))); | 3882 ElementsAre(Bucket(true, 2))); |
| 3883 | 3883 |
| 3884 // No RAPPOR metrics are logged in the case there is at least some server data | 3884 // No RAPPOR metrics are logged in the case there is at least some server data |
| 3885 // available for all forms. | 3885 // available for all forms. |
| 3886 EXPECT_EQ(0, rappor_service_.GetReportsCount()); | 3886 EXPECT_EQ(0, rappor_service_.GetReportsCount()); |
| 3887 } | 3887 } |
| 3888 | 3888 |
| 3889 } // namespace autofill | 3889 } // namespace autofill |
| OLD | NEW |