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

Unified Diff: ppapi/tests/test_utils.h

Issue 12817009: Add Query() support to FileRef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits, more callback ref shuffling. Created 7 years, 9 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: ppapi/tests/test_utils.h
diff --git a/ppapi/tests/test_utils.h b/ppapi/tests/test_utils.h
index e61efbddcd5a089422f1842a25e5e87b81397ae5..37e86295094b7d6e1cda8ef26ddf55b0b406d254 100644
--- a/ppapi/tests/test_utils.h
+++ b/ppapi/tests/test_utils.h
@@ -190,7 +190,10 @@ class TestCompletionCallbackWithOutput : public TestCompletionCallback {
return GetCallbackWithOutput();
}
- const OutputT& output() { return output_storage_.output(); }
+ OutputT output() {
+ return pp::internal::CallbackOutputTraits<OutputT>::StorageToPluginArg(
+ output_storage_);
+ }
typename pp::CompletionCallbackWithOutput<OutputT>::OutputStorageType
output_storage_;
@@ -201,10 +204,7 @@ pp::CompletionCallbackWithOutput<OutputT>
TestCompletionCallbackWithOutput<OutputT>::GetCallbackWithOutput() {
Reset();
if (callback_type_ == PP_BLOCKING) {
- pp::CompletionCallbackWithOutput<OutputT> cc(
- &TestCompletionCallback::Handler,
- this,
- &output_storage_);
+ pp::CompletionCallbackWithOutput<OutputT> cc(&output_storage_);
return cc;
}
@@ -225,7 +225,8 @@ TestCompletionCallbackWithOutput<OutputT>::GetCallbackWithOutput() {
#define CHECK_CALLBACK_BEHAVIOR(callback) \
do { \
if ((callback).failed()) \
- return (callback).errors(); \
+ return MakeFailureMessage(__FILE__, __LINE__, \
+ (callback).errors().c_str()); \
} while (false)
/*

Powered by Google App Engine
This is Rietveld 408576698