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

Unified Diff: chrome/browser/download/download_request_infobar_delegate.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, 6 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/download/download_request_infobar_delegate.cc
diff --git a/chrome/browser/download/download_request_infobar_delegate.cc b/chrome/browser/download/download_request_infobar_delegate.cc
index e0c89aaa3c751ce30630c48169c89de5b9eb7b88..408c18610a11df96f684bc1c47e907a53e26f146 100644
--- a/chrome/browser/download/download_request_infobar_delegate.cc
+++ b/chrome/browser/download/download_request_infobar_delegate.cc
@@ -13,7 +13,7 @@ DownloadRequestInfoBarDelegate::FakeCreateCallback*
DownloadRequestInfoBarDelegate::callback_ = NULL;
DownloadRequestInfoBarDelegate::~DownloadRequestInfoBarDelegate() {
- if (host_)
+ if (host_.get())
host_->Cancel();
}
@@ -68,11 +68,11 @@ string16 DownloadRequestInfoBarDelegate::GetButtonLabel(
}
bool DownloadRequestInfoBarDelegate::Accept() {
- if (host_) {
+ if (host_.get()) {
// Accept() call will invalidate host_ weak pointer if no further
// prompts are required.
host_->Accept();
}
- return !host_;
+ return !host_.get();
}
« no previous file with comments | « chrome/browser/chrome_to_mobile_service.cc ('k') | chrome/browser/download/download_ui_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698