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

Side by Side Diff: shell/shell_test_helper.cc

Issue 1067173003: Remove mojo:: part of mojo::shell:: nested namespace in //shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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
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 "shell/shell_test_helper.h" 5 #include "shell/shell_test_helper.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "shell/filename_util.h" 12 #include "shell/filename_util.h"
13 #include "shell/init.h" 13 #include "shell/init.h"
14 #include "shell/url_resolver.h" 14 #include "shell/url_resolver.h"
15 15
16 namespace mojo {
17 namespace shell { 16 namespace shell {
18 17
19 ShellTestHelper::ShellTestHelper() { 18 ShellTestHelper::ShellTestHelper() {
20 base::CommandLine::Init(0, nullptr); 19 base::CommandLine::Init(0, nullptr);
21 InitializeLogging(); 20 InitializeLogging();
22 } 21 }
23 22
24 ShellTestHelper::~ShellTestHelper() { 23 ShellTestHelper::~ShellTestHelper() {
25 } 24 }
26 25
27 void ShellTestHelper::Init() { 26 void ShellTestHelper::Init() {
28 context_.Init(); 27 context_.Init();
29 test_api_.reset( 28 test_api_.reset(
30 new ApplicationManager::TestAPI(context_.application_manager())); 29 new ApplicationManager::TestAPI(context_.application_manager()));
31 base::FilePath service_dir; 30 base::FilePath service_dir;
32 CHECK(PathService::Get(base::DIR_MODULE, &service_dir)); 31 CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
33 context_.url_resolver()->SetMojoBaseURL(FilePathToFileURL(service_dir)); 32 context_.url_resolver()->SetMojoBaseURL(FilePathToFileURL(service_dir));
34 } 33 }
35 34
36 void ShellTestHelper::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader, 35 void ShellTestHelper::SetLoaderForURL(scoped_ptr<ApplicationLoader> loader,
37 const GURL& url) { 36 const GURL& url) {
38 context_.application_manager()->SetLoaderForURL(loader.Pass(), url); 37 context_.application_manager()->SetLoaderForURL(loader.Pass(), url);
39 } 38 }
40 39
41 void ShellTestHelper::AddURLMapping(const GURL& url, const GURL& resolved_url) { 40 void ShellTestHelper::AddURLMapping(const GURL& url, const GURL& resolved_url) {
42 context_.url_resolver()->AddURLMapping(url, resolved_url); 41 context_.url_resolver()->AddURLMapping(url, resolved_url);
43 } 42 }
44 43
45 } // namespace shell 44 } // namespace shell
46 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698