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

Side by Side Diff: headless/app/headless_shell_main.cc

Issue 2666503002: Make headless_shell target compile for Windows (Closed)
Patch Set: revert .gn Created 3 years, 10 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 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/command_line.h"
6 #include "base/files/file_path.h"
7 #include "base/path_service.h"
5 #include "headless/public/headless_shell.h" 8 #include "headless/public/headless_shell.h"
6 9
10 void InitLogging() {
11 base::FilePath log_filename;
Sami 2017/02/09 17:51:40 I've recently added support for logging (https://c
dvallet 2017/02/10 05:29:49 Done. I think it should be working.
dvallet 2017/02/13 00:50:34 I've cheked is working in Windows. Though I had to
12 PathService::Get(base::DIR_EXE, &log_filename);
13 log_filename = log_filename.AppendASCII("headless_shell.log");
14 logging::LoggingSettings settings;
15 settings.logging_dest = logging::LOG_TO_ALL;
16 settings.log_file = log_filename.value().c_str();
17 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
18 logging::InitLogging(settings);
19 logging::SetLogItems(true, true, true, true);
20 }
21
7 int main(int argc, const char** argv) { 22 int main(int argc, const char** argv) {
23 base::CommandLine::Init(argc, argv);
24 InitLogging();
25
8 return headless::HeadlessShellMain(argc, argv); 26 return headless::HeadlessShellMain(argc, argv);
9 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698