| 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   658   // If the user switched away from this tab and then switched back, reload the |   658   // If the user switched away from this tab and then switched back, reload the | 
|   659   // Wallet items, in case they've changed. |   659   // Wallet items, in case they've changed. | 
|   660   int64 seconds_elapsed_since_last_refresh = |   660   int64 seconds_elapsed_since_last_refresh = | 
|   661       (base::TimeTicks::Now() - last_wallet_items_fetch_timestamp_).InSeconds(); |   661       (base::TimeTicks::Now() - last_wallet_items_fetch_timestamp_).InSeconds(); | 
|   662   if (IsPayingWithWallet() && wallet_items_ && |   662   if (IsPayingWithWallet() && wallet_items_ && | 
|   663       seconds_elapsed_since_last_refresh >= kWalletItemsRefreshRateSeconds) { |   663       seconds_elapsed_since_last_refresh >= kWalletItemsRefreshRateSeconds) { | 
|   664     GetWalletItems(); |   664     GetWalletItems(); | 
|   665   } |   665   } | 
|   666 } |   666 } | 
|   667  |   667  | 
|   668 TestableAutofillDialogView* AutofillDialogControllerImpl::GetTestableView() { |  | 
|   669   return view_ ? view_->GetTestableView() : NULL; |  | 
|   670 } |  | 
|   671  |  | 
|   672 //////////////////////////////////////////////////////////////////////////////// |   668 //////////////////////////////////////////////////////////////////////////////// | 
|   673 // AutofillDialogViewDelegate implementation. |   669 // AutofillDialogViewDelegate implementation. | 
|   674  |   670  | 
|   675 base::string16 AutofillDialogControllerImpl::DialogTitle() const { |   671 base::string16 AutofillDialogControllerImpl::DialogTitle() const { | 
|   676   if (ShouldShowSpinner()) |   672   if (ShouldShowSpinner()) | 
|   677     return base::string16(); |   673     return base::string16(); | 
|   678  |   674  | 
|   679   return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); |   675   return l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_TITLE); | 
|   680 } |   676 } | 
|   681  |   677  | 
| (...skipping 2851 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3533   view_->UpdateButtonStrip(); |  3529   view_->UpdateButtonStrip(); | 
|  3534 } |  3530 } | 
|  3535  |  3531  | 
|  3536 void AutofillDialogControllerImpl::FetchWalletCookie() { |  3532 void AutofillDialogControllerImpl::FetchWalletCookie() { | 
|  3537   net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); |  3533   net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); | 
|  3538   signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); |  3534   signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); | 
|  3539   signin_helper_->StartWalletCookieValueFetch(); |  3535   signin_helper_->StartWalletCookieValueFetch(); | 
|  3540 } |  3536 } | 
|  3541  |  3537  | 
|  3542 }  // namespace autofill |  3538 }  // namespace autofill | 
| OLD | NEW |