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

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

Issue 101383006: Fix glitch that allows both "Loading..." and "[x] Save details in Chrome" to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/views/autofill/autofill_dialog_views.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 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 OpenTabWithUrl(url); 2007 OpenTabWithUrl(url);
2008 } 2008 }
2009 2009
2010 void AutofillDialogControllerImpl::SignInLinkClicked() { 2010 void AutofillDialogControllerImpl::SignInLinkClicked() {
2011 ScopedViewUpdates updates(view_.get()); 2011 ScopedViewUpdates updates(view_.get());
2012 2012
2013 if (SignedInState() == NOT_CHECKED) { 2013 if (SignedInState() == NOT_CHECKED) {
2014 handling_use_wallet_link_click_ = true; 2014 handling_use_wallet_link_click_ = true;
2015 account_chooser_model_->SelectWalletAccount(0); 2015 account_chooser_model_->SelectWalletAccount(0);
2016 FetchWalletCookie(); 2016 FetchWalletCookie();
2017 view_->UpdateAccountChooser();
2018 } else if (signin_registrar_.IsEmpty()) { 2017 } else if (signin_registrar_.IsEmpty()) {
2019 // Start sign in. 2018 // Start sign in.
2020 waiting_for_explicit_sign_in_response_ = true; 2019 waiting_for_explicit_sign_in_response_ = true;
2021 content::Source<content::NavigationController> source(view_->ShowSignIn()); 2020 content::Source<content::NavigationController> source(view_->ShowSignIn());
2022 signin_registrar_.Add( 2021 signin_registrar_.Add(
2023 this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, source); 2022 this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, source);
2024 view_->UpdateAccountChooser();
2025 2023
2026 GetMetricLogger().LogDialogUiEvent( 2024 GetMetricLogger().LogDialogUiEvent(
2027 AutofillMetrics::DIALOG_UI_SIGNIN_SHOWN); 2025 AutofillMetrics::DIALOG_UI_SIGNIN_SHOWN);
2028 } else { 2026 } else {
2029 waiting_for_explicit_sign_in_response_ = false; 2027 waiting_for_explicit_sign_in_response_ = false;
2030 HideSignIn(); 2028 HideSignIn();
2031 } 2029 }
2030
2031 view_->UpdateAccountChooser();
2032 view_->UpdateButtonStrip();
2032 } 2033 }
2033 2034
2034 void AutofillDialogControllerImpl::NotificationCheckboxStateChanged( 2035 void AutofillDialogControllerImpl::NotificationCheckboxStateChanged(
2035 DialogNotification::Type type, bool checked) { 2036 DialogNotification::Type type, bool checked) {
2036 if (type == DialogNotification::WALLET_USAGE_CONFIRMATION) { 2037 if (type == DialogNotification::WALLET_USAGE_CONFIRMATION) {
2037 if (checked) { 2038 if (checked) {
2038 account_chooser_model_->SelectWalletAccount( 2039 account_chooser_model_->SelectWalletAccount(
2039 GetWalletClient()->user_index()); 2040 GetWalletClient()->user_index());
2040 } else { 2041 } else {
2041 account_chooser_model_->SelectUseAutofill(); 2042 account_chooser_model_->SelectUseAutofill();
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
3535 view_->UpdateButtonStrip(); 3536 view_->UpdateButtonStrip();
3536 } 3537 }
3537 3538
3538 void AutofillDialogControllerImpl::FetchWalletCookie() { 3539 void AutofillDialogControllerImpl::FetchWalletCookie() {
3539 net::URLRequestContextGetter* request_context = profile_->GetRequestContext(); 3540 net::URLRequestContextGetter* request_context = profile_->GetRequestContext();
3540 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context)); 3541 signin_helper_.reset(new wallet::WalletSigninHelper(this, request_context));
3541 signin_helper_->StartWalletCookieValueFetch(); 3542 signin_helper_->StartWalletCookieValueFetch();
3542 } 3543 }
3543 3544
3544 } // namespace autofill 3545 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698