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

Unified Diff: chrome/browser/nacl_host/nacl_process_host.cc

Issue 8311010: base::Bind: Convert FileUtilProxy::CreateOrOpenCallback. (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/nacl_host/nacl_process_host.h ('k') | webkit/blob/blob_url_request_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/nacl_host/nacl_process_host.cc
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index 3957c5bf0f85055f93be656caf4542c5bfe4f5b1..195a2fa21a04fb8ae024b7fad746dc6500ed0704 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -10,6 +10,7 @@
#include <fcntl.h>
#endif
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/path_service.h"
#include "base/stringprintf.h"
@@ -56,7 +57,7 @@ NaClProcessHost::NaClProcessHost(const std::wstring& url)
reply_msg_(NULL),
internal_(new NaClInternal()),
running_on_wow64_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
set_name(WideToUTF16Hack(url));
#if defined(OS_WIN)
running_on_wow64_ = (base::win::OSInfo::GetInstance()->wow64_status() ==
@@ -263,8 +264,8 @@ void NaClProcessHost::OnProcessLaunched() {
irt_path = plugin_dir.Append(GetIrtLibraryFilename());
}
- base::FileUtilProxy::CreateOrOpenCallback* callback =
- callback_factory_.NewCallback(&NaClProcessHost::OpenIrtFileDone);
+ base::FileUtilProxy::CreateOrOpenCallback callback =
+ base::Bind(&NaClProcessHost::OpenIrtFileDone, weak_factory_.GetWeakPtr());
if (!base::FileUtilProxy::CreateOrOpen(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
irt_path,
« no previous file with comments | « chrome/browser/nacl_host/nacl_process_host.h ('k') | webkit/blob/blob_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698