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

Unified Diff: chrome/browser/ui/views/download/download_item_view.cc

Issue 8301022: ui/views: Migrate usages of ScopedRunnableMethodFactory to base::WeakPtrFactory/base::Bind pair. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.h ('k') | chrome/browser/ui/views/first_run_bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/download/download_item_view.cc
diff --git a/chrome/browser/ui/views/download/download_item_view.cc b/chrome/browser/ui/views/download/download_item_view.cc
index 59c3b0d95a2afc45cf602b917725a50e983bb58b..88670ea53aa4c9e98341de2911780bc0c0a89a56 100644
--- a/chrome/browser/ui/views/download/download_item_view.cc
+++ b/chrome/browser/ui/views/download/download_item_view.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include <vector>
+#include "base/bind.h"
#include "base/callback.h"
#include "base/file_path.h"
#include "base/i18n/break_iterator.h"
@@ -393,7 +394,8 @@ void DownloadItemView::OnDownloadOpened(DownloadItem* download) {
SetEnabled(false);
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
- reenable_method_factory_.NewRunnableMethod(&DownloadItemView::Reenable),
+ base::Bind(&DownloadItemView::Reenable,
+ reenable_method_factory_.GetWeakPtr()),
kDisabledOnOpenDuration);
// Notify our parent.
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.h ('k') | chrome/browser/ui/views/first_run_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698