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

Side by Side Diff: content/shell/browser/shell_mojo_test_utils_android.cc

Issue 1398153002: Don't use base::MessageLoop::{Quit,QuitClosure} in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/test/appcache_test_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/browser/shell_mojo_test_utils_android.h" 5 #include "content/shell/browser/shell_mojo_test_utils_android.h"
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/browser/mojo/service_registry_android.h" 10 #include "content/browser/mojo/service_registry_android.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 test_environment->wrappers.push_back(wrapper_b); 62 test_environment->wrappers.push_back(wrapper_b);
63 63
64 return Java_ShellMojoTestUtils_makePair(env, wrapper_a->GetObj().obj(), 64 return Java_ShellMojoTestUtils_makePair(env, wrapper_a->GetObj().obj(),
65 wrapper_b->GetObj().obj()); 65 wrapper_b->GetObj().obj());
66 } 66 }
67 67
68 static void RunLoop(JNIEnv* env, 68 static void RunLoop(JNIEnv* env,
69 const JavaParamRef<jclass>& jcaller, 69 const JavaParamRef<jclass>& jcaller,
70 jlong timeout_ms) { 70 jlong timeout_ms) {
71 base::MessageLoop::current()->PostDelayedTask( 71 base::MessageLoop::current()->PostDelayedTask(
72 FROM_HERE, 72 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
73 base::MessageLoop::QuitClosure(),
74 base::TimeDelta::FromMilliseconds(timeout_ms)); 73 base::TimeDelta::FromMilliseconds(timeout_ms));
75 base::RunLoop run_loop; 74 base::RunLoop run_loop;
76 run_loop.Run(); 75 run_loop.Run();
77 } 76 }
78 77
79 bool RegisterShellMojoTestUtils(JNIEnv* env) { 78 bool RegisterShellMojoTestUtils(JNIEnv* env) {
80 return RegisterNativesImpl(env); 79 return RegisterNativesImpl(env);
81 } 80 }
82 81
83 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/shell.cc ('k') | content/test/appcache_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698