| Index: chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
|
| index aa520b21e72c677caf40afccec46a6345f19727e..3074cc170c83025cb19cd5224b729f334f5b0996 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
|
| @@ -92,8 +92,10 @@ void ManagePasswordsDecoration::UpdateUIState() {
|
| SetImage(OmniboxViewMac::ImageForResource(icon_->icon_id()));
|
| return;
|
| }
|
| - bool location_bar_is_dark = [[location_bar_->GetAutocompleteTextField()
|
| - window] inIncognitoModeWithSystemTheme];
|
| + // |location_bar_| can be NULL in tests.
|
| + bool location_bar_is_dark = location_bar_ &&
|
| + [[location_bar_->GetAutocompleteTextField() window]
|
| + inIncognitoModeWithSystemTheme];
|
| SetImage(GetMaterialIcon(location_bar_is_dark));
|
| }
|
|
|
| @@ -108,5 +110,7 @@ void ManagePasswordsDecoration::HideBubble() {
|
| }
|
|
|
| gfx::VectorIconId ManagePasswordsDecoration::GetMaterialVectorIconId() const {
|
| + // Note: update unit tests if this vector id ever changes (it's hard-coded
|
| + // there).
|
| return gfx::VectorIconId::AUTOLOGIN;
|
| }
|
|
|