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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 | 1514 |
1515 void AutofillDialogControllerImpl::FocusMoved() { | 1515 void AutofillDialogControllerImpl::FocusMoved() { |
1516 HidePopup(); | 1516 HidePopup(); |
1517 } | 1517 } |
1518 | 1518 |
1519 gfx::Image AutofillDialogControllerImpl::SplashPageImage() const { | 1519 gfx::Image AutofillDialogControllerImpl::SplashPageImage() const { |
1520 // Only show the splash page the first few times the dialog is opened. | 1520 // Only show the splash page the first few times the dialog is opened. |
1521 int show_count = | 1521 int show_count = |
1522 profile_->GetPrefs()->GetInteger(::prefs::kAutofillDialogShowCount); | 1522 profile_->GetPrefs()->GetInteger(::prefs::kAutofillDialogShowCount); |
1523 if (show_count <= 4) { | 1523 if (show_count <= 4) { |
| 1524 // TODO(estade): this logo is not the right size. |
1524 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 1525 return ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
1525 IDR_PRODUCT_LOGO_NAME_48); | 1526 IDR_PRODUCT_LOGO); |
1526 } | 1527 } |
1527 | 1528 |
1528 return gfx::Image(); | 1529 return gfx::Image(); |
1529 } | 1530 } |
1530 | 1531 |
1531 void AutofillDialogControllerImpl::ViewClosed() { | 1532 void AutofillDialogControllerImpl::ViewClosed() { |
1532 GetManager()->RemoveObserver(this); | 1533 GetManager()->RemoveObserver(this); |
1533 | 1534 |
1534 // TODO(ahutter): Once a user can cancel Autocheckout mid-flow, log that | 1535 // TODO(ahutter): Once a user can cancel Autocheckout mid-flow, log that |
1535 // metric here. | 1536 // metric here. |
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3100 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 3101 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
3101 } | 3102 } |
3102 | 3103 |
3103 // Has Wallet items. | 3104 // Has Wallet items. |
3104 return has_autofill_profiles ? | 3105 return has_autofill_profiles ? |
3105 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 3106 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
3106 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 3107 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
3107 } | 3108 } |
3108 | 3109 |
3109 } // namespace autofill | 3110 } // namespace autofill |
OLD | NEW |