Chromium Code Reviews| 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/command_line.h" | |
| 7 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 8 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 10 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 11 #include "blimp/common/compositor/blimp_image_serialization_processor.h" | 12 #include "blimp/common/compositor/blimp_image_serialization_processor.h" |
| 12 #include "blimp/engine/app/blimp_content_browser_client.h" | 13 #include "blimp/engine/app/blimp_content_browser_client.h" |
| 13 #include "blimp/engine/app/blimp_content_renderer_client.h" | 14 #include "blimp/engine/app/blimp_content_renderer_client.h" |
| 14 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 15 | 16 |
| 16 namespace blimp { | 17 namespace blimp { |
| 17 namespace engine { | 18 namespace engine { |
| 18 namespace { | 19 namespace { |
| 19 void InitLogging() { | 20 void InitLogging() { |
| 21 // TODO(haibinlu): Remove this before release. | |
| 22 // Enables a few verbose log by default. | |
| 23 if (!base::CommandLine::ForCurrentProcess()->HasSwitch("vmodule")) { | |
| 24 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | |
| 25 "vmodule", "remote_channel_main=1"); | |
|
haibinlu
2016/03/30 18:37:08
Do we need this? since we have reliable message de
Khushal
2016/03/30 18:55:47
A message might be dropped if it exceeds the limit
| |
| 26 } | |
| 27 | |
| 20 logging::LoggingSettings settings; | 28 logging::LoggingSettings settings; |
| 21 base::FilePath log_filename; | 29 base::FilePath log_filename; |
| 22 PathService::Get(base::DIR_EXE, &log_filename); | 30 PathService::Get(base::DIR_EXE, &log_filename); |
| 23 log_filename = log_filename.AppendASCII("blimp_engine.log"); | 31 log_filename = log_filename.AppendASCII("blimp_engine.log"); |
| 24 settings.logging_dest = logging::LOG_TO_ALL; | 32 settings.logging_dest = logging::LOG_TO_ALL; |
| 25 settings.log_file = log_filename.value().c_str(); | 33 settings.log_file = log_filename.value().c_str(); |
| 26 settings.delete_old = logging::DELETE_OLD_LOG_FILE; | 34 settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
| 27 logging::InitLogging(settings); | 35 logging::InitLogging(settings); |
| 28 logging::SetLogItems(true, // Process ID | 36 logging::SetLogItems(true, // Process ID |
| 29 true, // Thread ID | 37 true, // Thread ID |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 scoped_ptr<BlimpImageSerializationProcessor> image_serialization_processor = | 75 scoped_ptr<BlimpImageSerializationProcessor> image_serialization_processor = |
| 68 make_scoped_ptr(new BlimpImageSerializationProcessor( | 76 make_scoped_ptr(new BlimpImageSerializationProcessor( |
| 69 BlimpImageSerializationProcessor::Mode::SERIALIZATION)); | 77 BlimpImageSerializationProcessor::Mode::SERIALIZATION)); |
| 70 renderer_client_.reset( | 78 renderer_client_.reset( |
| 71 new BlimpContentRendererClient(std::move(image_serialization_processor))); | 79 new BlimpContentRendererClient(std::move(image_serialization_processor))); |
| 72 return renderer_client_.get(); | 80 return renderer_client_.get(); |
| 73 } | 81 } |
| 74 | 82 |
| 75 } // namespace engine | 83 } // namespace engine |
| 76 } // namespace blimp | 84 } // namespace blimp |
| OLD | NEW |