Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / autofill / autofill_dialog_common.cc
blob1bf62ac4332913ae523206b2a73eea332b46f922
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.
5 #include "chrome/browser/ui/autofill/autofill_dialog_common.h"
7 namespace autofill {
8 namespace common {
10 AutofillMetrics::DialogUiEvent DialogSectionToUiItemAddedEvent(
11 DialogSection section) {
12 switch (section) {
13 case SECTION_BILLING:
14 return AutofillMetrics::DIALOG_UI_BILLING_ITEM_ADDED;
16 case SECTION_CC_BILLING:
17 return AutofillMetrics::DIALOG_UI_CC_BILLING_ITEM_ADDED;
19 case SECTION_SHIPPING:
20 return AutofillMetrics::DIALOG_UI_SHIPPING_ITEM_ADDED;
22 case SECTION_CC:
23 return AutofillMetrics::DIALOG_UI_CC_ITEM_ADDED;
26 NOTREACHED();
27 return AutofillMetrics::NUM_DIALOG_UI_EVENTS;
30 AutofillMetrics::DialogUiEvent DialogSectionToUiSelectionChangedEvent(
31 DialogSection section) {
32 switch (section) {
33 case SECTION_BILLING:
34 return AutofillMetrics::DIALOG_UI_BILLING_SELECTED_SUGGESTION_CHANGED;
36 case SECTION_CC_BILLING:
37 return AutofillMetrics::DIALOG_UI_CC_BILLING_SELECTED_SUGGESTION_CHANGED;
39 case SECTION_SHIPPING:
40 return AutofillMetrics::DIALOG_UI_SHIPPING_SELECTED_SUGGESTION_CHANGED;
42 case SECTION_CC:
43 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED;
46 NOTREACHED();
47 return AutofillMetrics::NUM_DIALOG_UI_EVENTS;
50 } // namespace common
51 } // namespace autofill