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