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

Unified Diff: content/browser/download/download_browsertest.cc

Issue 16207005: Fix remaining uses of WeakPtr<T>'s operator T* conversion (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: content/browser/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index eec268d6b3a6b0044c5a2e9ef234b8752b7dd550..6cb54a679138d551b3c6ede5723a0353d6543476 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -120,7 +120,7 @@ class DownloadFileWithDelay : public DownloadFileImpl {
private:
static void RenameCallbackWrapper(
- DownloadFileWithDelayFactory* factory,
+ const base::WeakPtr<DownloadFileWithDelayFactory>& factory,
const RenameCompletionCallback& original_callback,
DownloadInterruptReason reason,
const base::FilePath& path);
@@ -204,11 +204,13 @@ void DownloadFileWithDelay::RenameAndAnnotate(
// static
void DownloadFileWithDelay::RenameCallbackWrapper(
- DownloadFileWithDelayFactory* factory,
+ const base::WeakPtr<DownloadFileWithDelayFactory>& factory,
const RenameCompletionCallback& original_callback,
DownloadInterruptReason reason,
const base::FilePath& path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!factory.get())
+ return;
factory->AddRenameCallback(base::Bind(original_callback, reason, path));
}
« no previous file with comments | « chrome/browser/ui/autofill/autofill_popup_controller_unittest.cc ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698