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 "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 DCHECK_EQ(AUTOCHECKOUT_IN_PROGRESS, autocheckout_state_); | 590 DCHECK_EQ(AUTOCHECKOUT_IN_PROGRESS, autocheckout_state_); |
591 GetMetricLogger().LogAutocheckoutDuration( | 591 GetMetricLogger().LogAutocheckoutDuration( |
592 base::Time::Now() - autocheckout_started_timestamp_, | 592 base::Time::Now() - autocheckout_started_timestamp_, |
593 AutofillMetrics::AUTOCHECKOUT_SUCCEEDED); | 593 AutofillMetrics::AUTOCHECKOUT_SUCCEEDED); |
594 autocheckout_state_ = AUTOCHECKOUT_SUCCESS; | 594 autocheckout_state_ = AUTOCHECKOUT_SUCCESS; |
595 autocheckout_started_timestamp_ = base::Time(); | 595 autocheckout_started_timestamp_ = base::Time(); |
596 view_->UpdateNotificationArea(); | 596 view_->UpdateNotificationArea(); |
597 view_->UpdateButtonStrip(); | 597 view_->UpdateButtonStrip(); |
598 } | 598 } |
599 | 599 |
| 600 TestableAutofillDialogView* AutofillDialogControllerImpl::GetTestableView() { |
| 601 return view_ ? view_->GetTestableView() : NULL; |
| 602 } |
| 603 |
600 //////////////////////////////////////////////////////////////////////////////// | 604 //////////////////////////////////////////////////////////////////////////////// |
601 // AutofillDialogController implementation. | 605 // AutofillDialogController implementation. |
602 | 606 |
603 string16 AutofillDialogControllerImpl::DialogTitle() const { | 607 string16 AutofillDialogControllerImpl::DialogTitle() const { |
604 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); | 608 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); |
605 } | 609 } |
606 | 610 |
607 string16 AutofillDialogControllerImpl::EditSuggestionText() const { | 611 string16 AutofillDialogControllerImpl::EditSuggestionText() const { |
608 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_EDIT); | 612 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_EDIT); |
609 } | 613 } |
(...skipping 2487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3097 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 3101 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
3098 } | 3102 } |
3099 | 3103 |
3100 // Has Wallet items. | 3104 // Has Wallet items. |
3101 return has_autofill_profiles ? | 3105 return has_autofill_profiles ? |
3102 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 3106 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
3103 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 3107 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
3104 } | 3108 } |
3105 | 3109 |
3106 } // namespace autofill | 3110 } // namespace autofill |
OLD | NEW |