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]; |