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

Unified Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

Issue 380773002: Pepper: Use base::Callback in RequestNexeFd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TrackedCallback ugh Created 6 years, 5 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 | « components/nacl/renderer/pnacl_translation_resource_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/ppb_nacl_private_impl.cc
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc
index 048130aea5346020ad58e8ac1c52ce4fe6b86efb..0336f64557885e16d8073b9334a411e79d49f087 100644
--- a/components/nacl/renderer/ppb_nacl_private_impl.cc
+++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -587,6 +587,19 @@ PP_Bool PPIsNonSFIModeEnabled() {
return PP_FromBool(IsNonSFIModeEnabled());
}
+void GetNexeFdContinuation(scoped_refptr<ppapi::TrackedCallback> callback,
+ PP_Bool* out_is_hit,
+ PP_FileHandle* out_handle,
+ int32_t pp_error,
+ bool is_hit,
+ PP_FileHandle handle) {
+ if (pp_error == PP_OK) {
+ *out_is_hit = PP_FromBool(is_hit);
+ *out_handle = handle;
+ }
+ callback->PostRun(pp_error);
+}
+
int32_t GetNexeFd(PP_Instance instance,
const char* pexe_url,
uint32_t abi_version,
@@ -645,9 +658,7 @@ int32_t GetNexeFd(PP_Instance instance,
GetRoutingID(instance),
instance,
cache_info,
- is_hit,
- handle,
- enter.callback());
+ base::Bind(&GetNexeFdContinuation, enter.callback(), is_hit, handle));
return enter.SetResult(PP_OK_COMPLETIONPENDING);
}
« no previous file with comments | « components/nacl/renderer/pnacl_translation_resource_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698