| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 // If the user switched away from this tab and then switched back, reload the | 639 // If the user switched away from this tab and then switched back, reload the |
| 640 // Wallet items, in case they've changed. | 640 // Wallet items, in case they've changed. |
| 641 int64 seconds_elapsed_since_last_refresh = | 641 int64 seconds_elapsed_since_last_refresh = |
| 642 (base::TimeTicks::Now() - last_wallet_items_fetch_timestamp_).InSeconds(); | 642 (base::TimeTicks::Now() - last_wallet_items_fetch_timestamp_).InSeconds(); |
| 643 if (IsPayingWithWallet() && wallet_items_ && | 643 if (IsPayingWithWallet() && wallet_items_ && |
| 644 seconds_elapsed_since_last_refresh >= kWalletItemsRefreshRateSeconds) { | 644 seconds_elapsed_since_last_refresh >= kWalletItemsRefreshRateSeconds) { |
| 645 GetWalletItems(); | 645 GetWalletItems(); |
| 646 } | 646 } |
| 647 } | 647 } |
| 648 | 648 |
| 649 TestableAutofillDialogView* AutofillDialogControllerImpl::GetTestableView() { | |
| 650 return view_ ? view_->GetTestableView() : NULL; | |
| 651 } | |
| 652 | |
| 653 //////////////////////////////////////////////////////////////////////////////// | 649 //////////////////////////////////////////////////////////////////////////////// |
| 654 // AutofillDialogViewDelegate implementation. | 650 // AutofillDialogViewDelegate implementation. |
| 655 | 651 |
| 656 base::string16 AutofillDialogControllerImpl::DialogTitle() const { | 652 base::string16 AutofillDialogControllerImpl::DialogTitle() const { |
| 657 if (ShouldShowSpinner()) | 653 if (ShouldShowSpinner()) |
| 658 return base::string16(); | 654 return base::string16(); |
| 659 | 655 |
| 660 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); | 656 return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); |
| 661 } | 657 } |
| 662 | 658 |
| (...skipping 2989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3652 view_->UpdateButtonStrip(); | 3648 view_->UpdateButtonStrip(); |
| 3653 } | 3649 } |
| 3654 | 3650 |
| 3655 void AutofillDialogControllerImpl::FetchWalletCookie() { | 3651 void AutofillDialogControllerImpl::FetchWalletCookie() { |
| 3656 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 3652 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |
| 3657 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 3653 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |
| 3658 signin_helper_->StartWalletCookieValueFetch(); | 3654 signin_helper_->StartWalletCookieValueFetch(); |
| 3659 } | 3655 } |
| 3660 | 3656 |
| 3661 } // namespace autofill | 3657 } // namespace autofill |
| OLD | NEW |