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

Side by Side Diff: components/web_view/test_runner/launcher.cc

Issue 1343823002: Revert of Move fetching logic out of ApplicationManager, eliminate url mappings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | content/browser/BUILD.gn » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/web_view/test_runner/launcher.h" 5 #include "components/web_view/test_runner/launcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h"
10 #include "mojo/runner/context.h" 9 #include "mojo/runner/context.h"
11 #include "url/gurl.h" 10 #include "url/gurl.h"
12 11
13 namespace web_view { 12 namespace web_view {
14 13
15 int LaunchTestRunner(int argc, char** argv) { 14 int LaunchTestRunner(int argc, char** argv) {
16 base::FilePath shell_dir;
17 PathService::Get(base::DIR_MODULE, &shell_dir);
18 // We want the runner::Context to outlive the MessageLoop so that pipes are 15 // We want the runner::Context to outlive the MessageLoop so that pipes are
19 // all gracefully closed / error-out before we try to shut the Context down. 16 // all gracefully closed / error-out before we try to shut the Context down.
20 mojo::runner::Context shell_context(shell_dir); 17 mojo::runner::Context shell_context;
21 { 18 {
22 base::MessageLoop message_loop; 19 base::MessageLoop message_loop;
23 if (!shell_context.Init()) { 20 if (!shell_context.Init()) {
24 return 0; 21 return 0;
25 } 22 }
26 23
27 message_loop.PostTask(FROM_HERE, 24 message_loop.PostTask(FROM_HERE,
28 base::Bind(&mojo::runner::Context::Run, 25 base::Bind(&mojo::runner::Context::Run,
29 base::Unretained(&shell_context), 26 base::Unretained(&shell_context),
30 GURL("mojo:web_view_test_runner"))); 27 GURL("mojo:web_view_test_runner")));
31 message_loop.Run(); 28 message_loop.Run();
32 29
33 // Must be called before |message_loop| is destroyed. 30 // Must be called before |message_loop| is destroyed.
34 shell_context.Shutdown(); 31 shell_context.Shutdown();
35 } 32 }
36 33
37 return 0; 34 return 0;
38 } 35 }
39 36
40 } // namespace web_view 37 } // namespace web_view
OLDNEW
« no previous file with comments | « no previous file | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698