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

Side by Side Diff: services/navigation/main.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 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 | « services/file/file_service.cc ('k') | services/navigation/navigation.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/debug/stack_trace.h" 7 #include "base/debug/stack_trace.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/public/app/content_main.h" 10 #include "content/public/app/content_main.h"
11 #include "services/navigation/content_client/main_delegate.h" 11 #include "services/navigation/content_client/main_delegate.h"
12 #include "services/service_manager/runner/init.h" 12 #include "services/service_manager/runner/init.h"
13 13
14 #if defined(OS_WIN) 14 #if defined(OS_WIN)
15 #include "content/public/app/sandbox_helper_win.h" 15 #include "content/public/app/sandbox_helper_win.h"
16 #include "sandbox/win/src/sandbox_types.h" 16 #include "sandbox/win/src/sandbox_types.h"
17 #endif 17 #endif
18 18
19 #if defined(OS_WIN) 19 #if defined(OS_WIN)
20 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { 20 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
21 int argc = 0; 21 int argc = 0;
22 char** argv = nullptr; 22 char** argv = nullptr;
23 #else 23 #else
24 int main(int argc, const char** argv) { 24 int main(int argc, const char** argv) {
25 #endif 25 #endif
26 base::CommandLine::Init(argc, argv); 26 base::CommandLine::Init(argc, argv);
27 shell::WaitForDebuggerIfNecessary(); 27 service_manager::WaitForDebuggerIfNecessary();
28 28
29 #if !defined(OFFICIAL_BUILD) 29 #if !defined(OFFICIAL_BUILD)
30 #if defined(OS_WIN) 30 #if defined(OS_WIN)
31 base::RouteStdioToConsole(false); 31 base::RouteStdioToConsole(false);
32 #endif 32 #endif
33 #endif 33 #endif
34 34
35 base::FilePath log_filename; 35 base::FilePath log_filename;
36 PathService::Get(base::DIR_EXE, &log_filename); 36 PathService::Get(base::DIR_EXE, &log_filename);
37 log_filename = log_filename.AppendASCII("navigation.mojo.log"); 37 log_filename = log_filename.AppendASCII("navigation.mojo.log");
38 logging::LoggingSettings settings; 38 logging::LoggingSettings settings;
39 settings.logging_dest = logging::LOG_TO_ALL; 39 settings.logging_dest = logging::LOG_TO_ALL;
40 settings.log_file = log_filename.value().c_str(); 40 settings.log_file = log_filename.value().c_str();
41 settings.delete_old = logging::DELETE_OLD_LOG_FILE; 41 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
42 logging::InitLogging(settings); 42 logging::InitLogging(settings);
43 43
44 navigation::MainDelegate delegate; 44 navigation::MainDelegate delegate;
45 content::ContentMainParams params(&delegate); 45 content::ContentMainParams params(&delegate);
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 sandbox::SandboxInterfaceInfo sandbox_info = { 0 }; 47 sandbox::SandboxInterfaceInfo sandbox_info = { 0 };
48 content::InitializeSandboxInfo(&sandbox_info); 48 content::InitializeSandboxInfo(&sandbox_info);
49 params.instance = GetModuleHandle(NULL); 49 params.instance = GetModuleHandle(NULL);
50 params.sandbox_info = &sandbox_info; 50 params.sandbox_info = &sandbox_info;
51 #endif 51 #endif
52 return content::ContentMain(params); 52 return content::ContentMain(params);
53 } 53 }
OLDNEW
« no previous file with comments | « services/file/file_service.cc ('k') | services/navigation/navigation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698