Index: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
index cdfaea1850c0f54213457166c3fb79f48abb3666..b4fcaf7b7d469cbd561849e1de3c7411c1115446 100644 |
--- a/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
+++ b/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc |
@@ -73,16 +73,15 @@ WeakPtr<AutofillPopupControllerImpl> AutofillPopupControllerImpl::GetOrCreate( |
WeakPtr<AutofillPopupDelegate> delegate, |
gfx::NativeView container_view, |
const gfx::RectF& element_bounds) { |
- DCHECK(!previous || previous->delegate_ == delegate); |
+ DCHECK(!previous.get() || previous->delegate_.get() == delegate.get()); |
- if (previous && |
- previous->container_view() == container_view && |
+ if (previous.get() && previous->container_view() == container_view && |
previous->element_bounds() == element_bounds) { |
previous->ClearState(); |
return previous; |
} |
- if (previous) |
+ if (previous.get()) |
previous->Hide(); |
AutofillPopupControllerImpl* controller = |
@@ -169,7 +168,7 @@ void AutofillPopupControllerImpl::Show( |
} |
void AutofillPopupControllerImpl::Hide() { |
- if (delegate_) |
+ if (delegate_.get()) |
delegate_->OnPopupHidden(this); |
if (view_) |