| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/engine/app/blimp_content_main_delegate.h" | 5 #include "blimp/engine/app/blimp_content_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 namespace blimp { | 25 namespace blimp { |
| 26 namespace engine { | 26 namespace engine { |
| 27 | 27 |
| 28 // Blimp engine crash client. This should be available globally and should be | 28 // Blimp engine crash client. This should be available globally and should be |
| 29 // long lived. | 29 // long lived. |
| 30 base::LazyInstance<BlimpEngineCrashReporterClient> | 30 base::LazyInstance<BlimpEngineCrashReporterClient> |
| 31 g_blimp_engine_crash_reporter_client = LAZY_INSTANCE_INITIALIZER; | 31 g_blimp_engine_crash_reporter_client = LAZY_INSTANCE_INITIALIZER; |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 void InitLogging() { | 34 void InitLogging() { |
| 35 // TODO(haibinlu): Remove this before release. | |
| 36 // Enables a few verbose log by default. | |
| 37 if (!base::CommandLine::ForCurrentProcess()->HasSwitch("vmodule")) { | |
| 38 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | |
| 39 "vmodule", "remote_channel_main=1"); | |
| 40 } | |
| 41 | |
| 42 logging::LoggingSettings settings; | 35 logging::LoggingSettings settings; |
| 43 base::FilePath log_filename; | 36 base::FilePath log_filename; |
| 44 PathService::Get(base::DIR_EXE, &log_filename); | 37 PathService::Get(base::DIR_EXE, &log_filename); |
| 45 log_filename = log_filename.AppendASCII("blimp_engine.log"); | 38 log_filename = log_filename.AppendASCII("blimp_engine.log"); |
| 46 settings.logging_dest = logging::LOG_TO_ALL; | 39 settings.logging_dest = logging::LOG_TO_ALL; |
| 47 settings.log_file = log_filename.value().c_str(); | 40 settings.log_file = log_filename.value().c_str(); |
| 48 settings.delete_old = logging::DELETE_OLD_LOG_FILE; | 41 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
| 49 logging::InitLogging(settings); | 42 logging::InitLogging(settings); |
| 50 logging::SetLogItems(true, // Process ID | 43 logging::SetLogItems(true, // Process ID |
| 51 true, // Thread ID | 44 true, // Thread ID |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 87 |
| 95 content::ContentRendererClient* | 88 content::ContentRendererClient* |
| 96 BlimpContentMainDelegate::CreateContentRendererClient() { | 89 BlimpContentMainDelegate::CreateContentRendererClient() { |
| 97 DCHECK(!renderer_client_); | 90 DCHECK(!renderer_client_); |
| 98 renderer_client_.reset(new BlimpContentRendererClient); | 91 renderer_client_.reset(new BlimpContentRendererClient); |
| 99 return renderer_client_.get(); | 92 return renderer_client_.get(); |
| 100 } | 93 } |
| 101 | 94 |
| 102 } // namespace engine | 95 } // namespace engine |
| 103 } // namespace blimp | 96 } // namespace blimp |
| OLD | NEW |