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

Side by Side Diff: mojo/runner/shell_test_base.cc

Issue 1107233002: Move runner stuff into a runner namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 | « mojo/runner/shell_test_base.h ('k') | mojo/runner/shell_test_base_android.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 "mojo/runner/shell_test_base.h" 5 #include "mojo/runner/shell_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "mojo/util/filename_util.h" 14 #include "mojo/util/filename_util.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace shell { 18 namespace runner {
19 namespace test { 19 namespace test {
20 20
21 namespace { 21 namespace {
22 22
23 void QuitIfRunning() { 23 void QuitIfRunning() {
24 if (base::MessageLoop::current() && 24 if (base::MessageLoop::current() &&
25 base::MessageLoop::current()->is_running()) { 25 base::MessageLoop::current()->is_running()) {
26 base::MessageLoop::current()->QuitWhenIdle(); 26 base::MessageLoop::current()->QuitWhenIdle();
27 } 27 }
28 } 28 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // to unknown mojo: urls that do not have specific local file or custom 63 // to unknown mojo: urls that do not have specific local file or custom
64 // mappings registered on the URL resolver are treated as shared libraries. 64 // mappings registered on the URL resolver are treated as shared libraries.
65 base::FilePath service_dir; 65 base::FilePath service_dir;
66 CHECK(PathService::Get(base::DIR_MODULE, &service_dir)); 66 CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
67 shell_context_.url_resolver()->SetMojoBaseURL( 67 shell_context_.url_resolver()->SetMojoBaseURL(
68 util::FilePathToFileURL(service_dir)); 68 util::FilePathToFileURL(service_dir));
69 } 69 }
70 #endif 70 #endif
71 71
72 } // namespace test 72 } // namespace test
73 } // namespace shell 73 } // namespace runner
74 } // namespace mojo 74 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/shell_test_base.h ('k') | mojo/runner/shell_test_base_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698