Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc

Issue 135933003: rAc: split TestableAutofillDialogView implementation into its own class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: GAE hates me. Reupload. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698