Skip to content

Commit 6dc5dca

Browse files
authored
Revert "Remove unused Settings::ToString. (#8642)" (#8689)
This reverts commit 4ead9c8. Reland tracked in #31433.
1 parent 9fa7336 commit 6dc5dca

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

common/settings.cc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,44 @@ Settings::Settings(const Settings& other) = default;
1414

1515
Settings::~Settings() = default;
1616

17+
std::string Settings::ToString() const {
18+
std::stringstream stream;
19+
stream << "Settings: " << std::endl;
20+
stream << "vm_snapshot_data_path: " << vm_snapshot_data_path << std::endl;
21+
stream << "vm_snapshot_instr_path: " << vm_snapshot_instr_path << std::endl;
22+
stream << "isolate_snapshot_data_path: " << isolate_snapshot_data_path
23+
<< std::endl;
24+
stream << "isolate_snapshot_instr_path: " << isolate_snapshot_instr_path
25+
<< std::endl;
26+
stream << "application_library_path: " << application_library_path
27+
<< std::endl;
28+
stream << "temp_directory_path: " << temp_directory_path << std::endl;
29+
stream << "dart_flags:" << std::endl;
30+
for (const auto& dart_flag : dart_flags) {
31+
stream << " " << dart_flag << std::endl;
32+
}
33+
stream << "start_paused: " << start_paused << std::endl;
34+
stream << "trace_skia: " << trace_skia << std::endl;
35+
stream << "trace_startup: " << trace_startup << std::endl;
36+
stream << "trace_systrace: " << trace_systrace << std::endl;
37+
stream << "dump_skp_on_shader_compilation: " << dump_skp_on_shader_compilation
38+
<< std::endl;
39+
stream << "endless_trace_buffer: " << endless_trace_buffer << std::endl;
40+
stream << "enable_dart_profiling: " << enable_dart_profiling << std::endl;
41+
stream << "disable_dart_asserts: " << disable_dart_asserts << std::endl;
42+
stream << "enable_observatory: " << enable_observatory << std::endl;
43+
stream << "observatory_port: " << observatory_port << std::endl;
44+
stream << "ipv6: " << ipv6 << std::endl;
45+
stream << "use_test_fonts: " << use_test_fonts << std::endl;
46+
stream << "enable_software_rendering: " << enable_software_rendering
47+
<< std::endl;
48+
stream << "log_tag: " << log_tag << std::endl;
49+
stream << "icu_initialization_required: " << icu_initialization_required
50+
<< std::endl;
51+
stream << "icu_data_path: " << icu_data_path << std::endl;
52+
stream << "assets_dir: " << assets_dir << std::endl;
53+
stream << "assets_path: " << assets_path << std::endl;
54+
return stream.str();
55+
}
56+
1757
} // namespace flutter

common/settings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ struct Settings {
146146
fml::UniqueFD::element_type assets_dir =
147147
fml::UniqueFD::traits_type::InvalidValue();
148148
std::string assets_path;
149+
150+
std::string ToString() const;
149151
};
150152

151153
} // namespace flutter

0 commit comments

Comments
 (0)