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

Unified Diff: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm

Issue 1040513002: Autofill OSX: Do not show storage footer when !CanStoreLocally(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cup_14_disable_after_error_02
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
diff --git a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
index 365c888998652561f421558e71384ed3d1b9f42d..0053192706684cca4a9ad973c0a21bea6c6bcd27 100644
--- a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
+++ b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm
@@ -330,25 +330,25 @@ void CardUnmaskPromptViewBridge::PerformClose() {
return view;
}
-// +------------------------------------------------+
-// | titleLabel_ (Single line.) |
-// |------------------------------------------------|
-// | permanentErrorBox_ (Multiline, may be hidden.) |
-// |------------------------------------------------|
-// | instructionsLabel_ (Multiline.) |
-// |------------------------------------------------|
-// | monthPopup_ yearPopup_ cvcInput_ cvcImage |
-// | (All enclosed in inputRowView_. Month and |
-// | year may be hidden.) |
-// |------------------------------------------------|
-// | errorLabel_ (Multiline. Always takes up space |
-// | for one line even if empty.) |
-// |------------------------------------------------|
-// | [Cancel] [Verify] |
-// |------------------------------------------------|
-// | storageCheckbox_ storageTooltip_ |
-// | (Both enclosed in storageView_.) |
-// +------------------------------------------------+
+// +---------------------------------------------------------------------------+
+// | titleLabel_ (Single line.) |
+// |---------------------------------------------------------------------------|
+// | permanentErrorBox_ (Multiline, may be hidden.) |
+// |---------------------------------------------------------------------------|
+// | instructionsLabel_ (Multiline.) |
+// |---------------------------------------------------------------------------|
+// | monthPopup_ yearPopup_ cvcInput_ cvcImage |
+// | (All enclosed in inputRowView_. Month and year may be hidden.) |
+// |---------------------------------------------------------------------------|
+// | errorLabel_ (Multiline. Always takes up space for one line even if |
+// | empty.) |
+// |---------------------------------------------------------------------------|
+// | [Cancel] [Verify] |
+// |---------------------------------------------------------------------------|
+// | storageCheckbox_ storageTooltip_ |
+// | (Both enclosed in storageView_. May be hidden but still taking up |
+// | layout space. Will all be nil if !CanStoreLocally()). |
+// +---------------------------------------------------------------------------+
- (void)performLayoutAndDisplay:(BOOL)display {
// Calculate dialog content width.
CGFloat contentWidth =
@@ -359,9 +359,11 @@ void CardUnmaskPromptViewBridge::PerformClose() {
[storageView_
setFrameOrigin:NSMakePoint(0, chrome_style::kClientBottomPadding)];
+ CGFloat verifyMinY =
+ storageView_ ? NSMaxY([storageView_ frame]) + chrome_style::kRowPadding
+ : chrome_style::kClientBottomPadding;
[verifyButton_ setFrameOrigin:
- NSMakePoint(contentWidth - NSWidth([verifyButton_ frame]),
- NSMaxY([storageView_ frame]) + chrome_style::kRowPadding)];
+ NSMakePoint(contentWidth - NSWidth([verifyButton_ frame]), verifyMinY)];
[cancelButton_
setFrameOrigin:NSMakePoint(NSMinX([verifyButton_ frame]) - kButtonGap -
@@ -428,8 +430,10 @@ void CardUnmaskPromptViewBridge::PerformClose() {
inputRowView_.reset([[NSView alloc] initWithFrame:NSZeroRect]);
[mainView addSubview:inputRowView_];
- storageView_ = [self createStorageViewWithController:controller];
- [mainView addSubview:storageView_];
+ if (controller->CanStoreLocally()) {
bondd 2015/03/27 00:20:52 CanStoreLocally() check can either go here, or at
groby-ooo-7-16 2015/03/27 00:53:17 sgtm
+ storageView_ = [self createStorageViewWithController:controller];
groby-ooo-7-16 2015/03/27 00:53:17 storageView_.reset()?
bondd 2015/03/27 01:09:38 Sorry, could you please clarify what you mean here
groby-ooo-7-16 2015/03/27 01:36:07 I assumed createStorage... returns a pointer, and
+ [mainView addSubview:storageView_];
+ }
progressOverlayLabel_.reset([constrained_window::CreateLabel() retain]);
[progressOverlayLabel_ setHidden:YES];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698