From 1dc3354363e124621b6768d10f398fd8d842b1be Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 22 Apr 2019 14:07:17 -0700 Subject: [PATCH 1/2] Revert "Remove unused Settings::ToString. (#8642)" This reverts commit 4ead9c8f99d417c13bc8c51e6e90c66ec52045b6. Reland tracked in https://github.com/flutter/flutter/issues/31433. --- common/settings.cc | 40 ++++++++++++++++++++++++++++++++++++++++ common/settings.h | 2 ++ 2 files changed, 42 insertions(+) diff --git a/common/settings.cc b/common/settings.cc index 12f6bc6386c67..7dae838f4ac7f 100644 --- a/common/settings.cc +++ b/common/settings.cc @@ -14,4 +14,44 @@ Settings::Settings(const Settings& other) = default; Settings::~Settings() = default; +std::string Settings::ToString() const { + std::stringstream stream; + stream << "Settings: " << std::endl; + stream << "vm_snapshot_data_path: " << vm_snapshot_data_path << std::endl; + stream << "vm_snapshot_instr_path: " << vm_snapshot_instr_path << std::endl; + stream << "isolate_snapshot_data_path: " << isolate_snapshot_data_path + << std::endl; + stream << "isolate_snapshot_instr_path: " << isolate_snapshot_instr_path + << std::endl; + stream << "application_library_path: " << application_library_path + << std::endl; + stream << "temp_directory_path: " << temp_directory_path << std::endl; + stream << "dart_flags:" << std::endl; + for (const auto& dart_flag : dart_flags) { + stream << " " << dart_flag << std::endl; + } + stream << "start_paused: " << start_paused << std::endl; + stream << "trace_skia: " << trace_skia << std::endl; + stream << "trace_startup: " << trace_startup << std::endl; + stream << "trace_systrace: " << trace_systrace << std::endl; + stream << "dump_skp_on_shader_compilation: " << dump_skp_on_shader_compilation + << std::endl; + stream << "endless_trace_buffer: " << endless_trace_buffer << std::endl; + stream << "enable_dart_profiling: " << enable_dart_profiling << std::endl; + stream << "disable_dart_asserts: " << disable_dart_asserts << std::endl; + stream << "enable_observatory: " << enable_observatory << std::endl; + stream << "observatory_port: " << observatory_port << std::endl; + stream << "ipv6: " << ipv6 << std::endl; + stream << "use_test_fonts: " << use_test_fonts << std::endl; + stream << "enable_software_rendering: " << enable_software_rendering + << std::endl; + stream << "log_tag: " << log_tag << std::endl; + stream << "icu_initialization_required: " << icu_initialization_required + << std::endl; + stream << "icu_data_path: " << icu_data_path << std::endl; + stream << "assets_dir: " << assets_dir << std::endl; + stream << "assets_path: " << assets_path << std::endl; + return stream.str(); +} + } // namespace flutter diff --git a/common/settings.h b/common/settings.h index a1d6c64fa1208..69a86c92b5fbc 100644 --- a/common/settings.h +++ b/common/settings.h @@ -146,6 +146,8 @@ struct Settings { fml::UniqueFD::element_type assets_dir = fml::UniqueFD::traits_type::InvalidValue(); std::string assets_path; + + std::string ToString() const; }; } // namespace flutter From 547f57be04b37cfaed44dd357fe0ba203d53906d Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 22 Apr 2019 14:11:51 -0700 Subject: [PATCH 2/2] PR --- common/settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/settings.h b/common/settings.h index 69a86c92b5fbc..d71cd408dd3b7 100644 --- a/common/settings.h +++ b/common/settings.h @@ -146,7 +146,7 @@ struct Settings { fml::UniqueFD::element_type assets_dir = fml::UniqueFD::traits_type::InvalidValue(); std::string assets_path; - + std::string ToString() const; };