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

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

Issue 106033007: Disable wallet in countries where it's not supported, take 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 6 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 return base::string16(); 722 return base::string16();
723 723
724 return legal_documents_text_; 724 return legal_documents_text_;
725 } 725 }
726 726
727 bool AutofillDialogControllerImpl::ShouldShowSpinner() const { 727 bool AutofillDialogControllerImpl::ShouldShowSpinner() const {
728 return SignedInState() == REQUIRES_RESPONSE || 728 return SignedInState() == REQUIRES_RESPONSE ||
729 SignedInState() == REQUIRES_PASSIVE_SIGN_IN; 729 SignedInState() == REQUIRES_PASSIVE_SIGN_IN;
730 } 730 }
731 731
732 // TODO(estade): Only show account chooser for Wallet in the US.
733 // http://crbug.com/323641
734 bool AutofillDialogControllerImpl::ShouldShowAccountChooser() const { 732 bool AutofillDialogControllerImpl::ShouldShowAccountChooser() const {
735 return !ShouldShowSpinner(); 733 return !ShouldShowSpinner() && GetManager()->IsCountryOfInterest("US");
736 } 734 }
737 735
738 bool AutofillDialogControllerImpl::ShouldShowSignInWebView() const { 736 bool AutofillDialogControllerImpl::ShouldShowSignInWebView() const {
739 return !signin_registrar_.IsEmpty(); 737 return !signin_registrar_.IsEmpty();
740 } 738 }
741 739
742 GURL AutofillDialogControllerImpl::SignInUrl() const { 740 GURL AutofillDialogControllerImpl::SignInUrl() const {
743 return wallet::GetSignInUrl(); 741 return wallet::GetSignInUrl();
744 } 742 }
745 743
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 view_->UpdateButtonStrip(); 3536 view_->UpdateButtonStrip();
3539 } 3537 }
3540 3538
3541 void AutofillDialogControllerImpl::FetchWalletCookie() { 3539 void AutofillDialogControllerImpl::FetchWalletCookie() {
3542 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3540 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3543 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3541 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3544 signin_helper_->StartWalletCookieValueFetch(); 3542 signin_helper_->StartWalletCookieValueFetch();
3545 } 3543 }
3546 3544
3547 } // namespace autofill 3545 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698