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

Unified Diff: ppapi/proxy/tracked_callback_unittest.cc

Issue 869883003: Never lock the Pepper proxy lock on the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix size_t vs int32_t Created 5 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
« no previous file with comments | « ppapi/proxy/resource_reply_thread_registrar.cc ('k') | ppapi/proxy/udp_socket_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/tracked_callback_unittest.cc
diff --git a/ppapi/proxy/tracked_callback_unittest.cc b/ppapi/proxy/tracked_callback_unittest.cc
index dfd6c26b8bc0824562136aeeb9e05ef4b871a7d0..748dcfb4784788956894cf98fddf38db0848e637 100644
--- a/ppapi/proxy/tracked_callback_unittest.cc
+++ b/ppapi/proxy/tracked_callback_unittest.cc
@@ -120,7 +120,6 @@ struct CallbackRunInfo {
int32_t result() { return result_; }
unsigned completion_task_run_count() { return completion_task_run_count_; }
int32_t completion_task_result() { return completion_task_result_; }
-
private:
unsigned run_count_;
int32_t result_;
@@ -141,10 +140,9 @@ void TestCallback(void* user_data, int32_t result) {
class CallbackShutdownTest : public TrackedCallbackTest {
public:
- CallbackShutdownTest()
- : info_did_run_(&thread_checker_),
- info_did_abort_(&thread_checker_),
- info_didnt_run_(&thread_checker_) {}
+ CallbackShutdownTest() : info_did_run_(&thread_checker_),
+ info_did_abort_(&thread_checker_),
+ info_didnt_run_(&thread_checker_) {}
// Cases:
// (1) A callback which is run (so shouldn't be aborted on shutdown).
@@ -247,9 +245,9 @@ class CallbackMockResource : public Resource {
ProxyAutoLock acquire;
// |thread_checker_| will bind to the background thread.
thread_checker_.DetachFromThread();
- loop_resource->message_loop_proxy()->PostTask(
- FROM_HERE, RunWhileLocked(base::Bind(
- &CallbackMockResource::CreateCallbacks, this)));
+ loop_resource->message_loop_proxy()->PostTask(FROM_HERE,
+ RunWhileLocked(
+ base::Bind(&CallbackMockResource::CreateCallbacks, this)));
}
int32_t CompletionTask(CallbackRunInfo* info, int32_t result) {
@@ -350,10 +348,12 @@ class CallbackMockResource : public Resource {
// In order to test that the completion task can override the callback
// result, we need to test callbacks with and without a completion task.
callback_did_run_with_completion_task_ = new TrackedCallback(
- this, PP_MakeCompletionCallback(&TestCallback,
- &info_did_run_with_completion_task_));
+ this,
+ PP_MakeCompletionCallback(&TestCallback,
+ &info_did_run_with_completion_task_));
callback_did_run_with_completion_task_->set_completion_task(
- Bind(&CallbackMockResource::CompletionTask, this,
+ Bind(&CallbackMockResource::CompletionTask,
+ this,
&info_did_run_with_completion_task_));
callback_did_abort_ = new TrackedCallback(
« no previous file with comments | « ppapi/proxy/resource_reply_thread_registrar.cc ('k') | ppapi/proxy/udp_socket_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698