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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller_impl.cc

Issue 15987009: Update chrome/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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_)

Powered by Google App Engine
This is Rietveld 408576698