Index: chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
diff --git a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
index e0bc8465d0d144d0b4a56ba0f32540088d41b6af..1b8edd2dd864b7524e40f09aa65c5f21f8530b03 100644 |
--- a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
+++ b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm |
@@ -134,7 +134,9 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); |
// Password item. |
// It should be at least as wide as the box without the padding. |
NSView* password = [self createPasswordView]; |
vasilii
2015/12/15 15:58:01
It's rather a password row, not just a password
dvadym
2015/12/16 14:16:31
Done.
|
- [view addSubview:password]; |
+ if (password) { |
+ [view addSubview:password]; |
+ } |
base::scoped_nsobject<NSTextField> warm_welcome; |
if ([self shouldShowGoogleSmartLockWelcome]) { |
@@ -176,11 +178,13 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64); |
curY = NSMaxY([warm_welcome frame]) + kUnrelatedControlVerticalPadding; |
} |
+ if (password) { |
// Password item goes on the next row. |
vasilii
2015/12/15 15:58:01
indent
dvadym
2015/12/16 14:16:31
Done.
|
[password setFrameOrigin:NSMakePoint(curX, curY)]; |
// Title goes at the top after some padding. |
curY = NSMaxY([password frame]) + kUnrelatedControlVerticalPadding; |
+ } |
[titleView setFrameOrigin:NSMakePoint(curX, curY)]; |
const CGFloat height = NSMaxY([titleView frame]) + kFramePadding; |