| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" | |
| 6 | |
| 7 namespace autofill { | |
| 8 namespace common { | |
| 9 | |
| 10 AutofillMetrics::DialogUiEvent DialogSectionToUiItemAddedEvent( | |
| 11 DialogSection section) { | |
| 12 switch (section) { | |
| 13 case SECTION_BILLING: | |
| 14 return AutofillMetrics::DIALOG_UI_BILLING_ITEM_ADDED; | |
| 15 | |
| 16 case SECTION_SHIPPING: | |
| 17 return AutofillMetrics::DIALOG_UI_SHIPPING_ITEM_ADDED; | |
| 18 | |
| 19 case SECTION_CC: | |
| 20 return AutofillMetrics::DIALOG_UI_CC_ITEM_ADDED; | |
| 21 } | |
| 22 | |
| 23 NOTREACHED(); | |
| 24 return AutofillMetrics::NUM_DIALOG_UI_EVENTS; | |
| 25 } | |
| 26 | |
| 27 AutofillMetrics::DialogUiEvent DialogSectionToUiSelectionChangedEvent( | |
| 28 DialogSection section) { | |
| 29 switch (section) { | |
| 30 case SECTION_BILLING: | |
| 31 return AutofillMetrics::DIALOG_UI_BILLING_SELECTED_SUGGESTION_CHANGED; | |
| 32 | |
| 33 case SECTION_SHIPPING: | |
| 34 return AutofillMetrics::DIALOG_UI_SHIPPING_SELECTED_SUGGESTION_CHANGED; | |
| 35 | |
| 36 case SECTION_CC: | |
| 37 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED; | |
| 38 } | |
| 39 | |
| 40 NOTREACHED(); | |
| 41 return AutofillMetrics::NUM_DIALOG_UI_EVENTS; | |
| 42 } | |
| 43 | |
| 44 } // namespace common | |
| 45 } // namespace autofill | |
| OLD | NEW |