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

Side by Side Diff: ash/shell/content/shell_with_content_main.cc

Issue 2618143002: cros: Remove some OS platform ifdefs from ash (Closed)
Patch Set: rebase Created 3 years, 11 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 | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell_unittest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/shell/content/client/shell_main_delegate.h" 5 #include "ash/shell/content/client/shell_main_delegate.h"
6 #include "base/at_exit.h" 6 #include "base/at_exit.h"
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/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 11
12 #if defined(OS_WIN)
13 #include "content/public/app/sandbox_helper_win.h"
14 #include "sandbox/win/src/sandbox_types.h"
15 #endif
16
17 #if defined(OS_WIN)
18 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
19 int argc = 0;
20 char** argv = nullptr;
21 #else
22 int main(int argc, const char** argv) { 12 int main(int argc, const char** argv) {
23 #endif
24 base::CommandLine::Init(argc, argv); 13 base::CommandLine::Init(argc, argv);
25 base::AtExitManager exit_manager; 14 base::AtExitManager exit_manager;
26 15
27 base::FilePath log_filename; 16 base::FilePath log_filename;
28 PathService::Get(base::DIR_EXE, &log_filename); 17 PathService::Get(base::DIR_EXE, &log_filename);
29 log_filename = log_filename.AppendASCII("ash_shell.log"); 18 log_filename = log_filename.AppendASCII("ash_shell.log");
30 logging::LoggingSettings settings; 19 logging::LoggingSettings settings;
31 settings.logging_dest = logging::LOG_TO_ALL; 20 settings.logging_dest = logging::LOG_TO_ALL;
32 settings.log_file = log_filename.value().c_str(); 21 settings.log_file = log_filename.value().c_str();
33 settings.delete_old = logging::DELETE_OLD_LOG_FILE; 22 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
34 logging::InitLogging(settings); 23 logging::InitLogging(settings);
35 24
36 ash::shell::ShellMainDelegate delegate; 25 ash::shell::ShellMainDelegate delegate;
37 content::ContentMainParams params(&delegate); 26 content::ContentMainParams params(&delegate);
38
39 #if defined(OS_WIN)
40 sandbox::SandboxInterfaceInfo sandbox_info = {0};
41 content::InitializeSandboxInfo(&sandbox_info);
42 params.instance = instance;
43 params.sandbox_info = &sandbox_info;
44 #else
45 params.argc = argc; 27 params.argc = argc;
46 params.argv = argv; 28 params.argv = argv;
47 #endif
48 29
49 return content::ContentMain(params); 30 return content::ContentMain(params);
50 } 31 }
OLDNEW
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698