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

Side by Side Diff: content/shell/app/shell_main_delegate.cc

Issue 16519003: Define a LoggingSettings struct to use for InitLogging() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error Created 7 years, 6 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 | Annotate | Revision Log
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 "content/shell/app/shell_main_delegate.h" 5 #include "content/shell/app/shell_main_delegate.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/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // {6A3E50A4-7E15-4099-8413-EC94D8C2A4B6} 64 // {6A3E50A4-7E15-4099-8413-EC94D8C2A4B6}
65 const GUID kContentShellProviderName = { 65 const GUID kContentShellProviderName = {
66 0x6a3e50a4, 0x7e15, 0x4099, 66 0x6a3e50a4, 0x7e15, 0x4099,
67 { 0x84, 0x13, 0xec, 0x94, 0xd8, 0xc2, 0xa4, 0xb6 } }; 67 { 0x84, 0x13, 0xec, 0x94, 0xd8, 0xc2, 0xa4, 0xb6 } };
68 #endif 68 #endif
69 69
70 void InitLogging() { 70 void InitLogging() {
71 base::FilePath log_filename; 71 base::FilePath log_filename;
72 PathService::Get(base::DIR_EXE, &log_filename); 72 PathService::Get(base::DIR_EXE, &log_filename);
73 log_filename = log_filename.AppendASCII("content_shell.log"); 73 log_filename = log_filename.AppendASCII("content_shell.log");
74 logging::InitLogging( 74 logging::LoggingSettings settings;
75 log_filename.value().c_str(), 75 settings.logging_dest = logging::LOG_TO_ALL;
76 logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, 76 settings.log_file = log_filename.value().c_str();
77 logging::LOCK_LOG_FILE, 77 settings.delete_old = logging::DELETE_OLD_LOG_FILE;
78 logging::DELETE_OLD_LOG_FILE, 78 logging::InitLogging(settings);
79 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
80 logging::SetLogItems(true, true, true, true); 79 logging::SetLogItems(true, true, true, true);
81 } 80 }
82 81
83 } // namespace 82 } // namespace
84 83
85 namespace content { 84 namespace content {
86 85
87 ShellMainDelegate::ShellMainDelegate() { 86 ShellMainDelegate::ShellMainDelegate() {
88 } 87 }
89 88
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 browser_client_.reset(new ShellContentBrowserClient); 209 browser_client_.reset(new ShellContentBrowserClient);
211 return browser_client_.get(); 210 return browser_client_.get();
212 } 211 }
213 212
214 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { 213 ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() {
215 renderer_client_.reset(new ShellContentRendererClient); 214 renderer_client_.reset(new ShellContentRendererClient);
216 return renderer_client_.get(); 215 return renderer_client_.get();
217 } 216 }
218 217
219 } // namespace content 218 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/video_decode_accelerator_unittest.cc ('k') | courgette/courgette_tool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698