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

Unified Diff: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc

Issue 1011503004: Autofill card unmasking - never store locally in incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inline and format Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
diff --git a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
index 638e300915628d9b498a5bababf0aade211a44b4..dd3a8698490b74a93494deb760fb3c48d9a8438f 100644
--- a/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
+++ b/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
@@ -141,8 +141,8 @@ void CardUnmaskPromptViews::SetRetriableErrorMessage(
void CardUnmaskPromptViews::SetInputsEnabled(bool enabled) {
cvc_input_->SetEnabled(enabled);
- storage_checkbox_->SetEnabled(enabled);
-
+ if (storage_checkbox_)
+ storage_checkbox_->SetEnabled(enabled);
if (month_input_)
month_input_->SetEnabled(enabled);
if (year_input_)
@@ -155,6 +155,9 @@ views::View* CardUnmaskPromptViews::GetContentsView() {
}
views::View* CardUnmaskPromptViews::CreateFootnoteView() {
+ if (!controller_->CanStoreLocally())
+ return nullptr;
+
// Local storage checkbox and (?) tooltip.
views::View* storage_row = new views::View();
views::BoxLayout* storage_row_layout = new views::BoxLayout(
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698