@@ -235,55 +235,33 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
235
235
settings.executable_name = command_line.argv0 ();
236
236
}
237
237
238
- // Enable the VM Service
239
- settings.enable_vm_service =
240
- !command_line.HasOption (FlagForSwitch (Switch::DisableVMService)) &&
241
- // TODO(bkonyi): remove once flutter_tools no longer uses this option.
242
- // See https://github.com/dart-lang/sdk/issues/50233
238
+ // Enable Observatory
239
+ settings.enable_observatory =
243
240
!command_line.HasOption (FlagForSwitch (Switch::DisableObservatory));
244
241
245
- // Enable mDNS VM Service Publication
246
- settings.enable_vm_service_publication =
247
- !command_line.HasOption (
248
- FlagForSwitch (Switch::DisableVMServicePublication)) &&
249
- !command_line.HasOption (
250
- FlagForSwitch (Switch::DisableObservatoryPublication));
251
-
252
- // Set VM Service Host
253
- if (command_line.HasOption (FlagForSwitch (Switch::DeviceVMServiceHost))) {
254
- command_line.GetOptionValue (FlagForSwitch (Switch::DeviceVMServiceHost),
255
- &settings.vm_service_host );
256
- } else if (command_line.HasOption (
257
- FlagForSwitch (Switch::DeviceObservatoryHost))) {
258
- // TODO(bkonyi): remove once flutter_tools no longer uses this option.
259
- // See https://github.com/dart-lang/sdk/issues/50233
242
+ // Enable mDNS Observatory Publication
243
+ settings.enable_observatory_publication = !command_line.HasOption (
244
+ FlagForSwitch (Switch::DisableObservatoryPublication));
245
+
246
+ // Set Observatory Host
247
+ if (command_line.HasOption (FlagForSwitch (Switch::DeviceObservatoryHost))) {
260
248
command_line.GetOptionValue (FlagForSwitch (Switch::DeviceObservatoryHost),
261
- &settings.vm_service_host );
249
+ &settings.observatory_host );
262
250
}
263
- // Default the VM Service port based on --ipv6 if not set.
264
- if (settings.vm_service_host .empty ()) {
265
- settings.vm_service_host =
251
+ // Default the observatory port based on --ipv6 if not set.
252
+ if (settings.observatory_host .empty ()) {
253
+ settings.observatory_host =
266
254
command_line.HasOption (FlagForSwitch (Switch::IPv6)) ? " ::1"
267
255
: " 127.0.0.1" ;
268
256
}
269
257
270
- // Set VM Service Port
271
- if (command_line.HasOption (FlagForSwitch (Switch::DeviceVMServicePort))) {
272
- if (!GetSwitchValue (command_line, Switch::DeviceVMServicePort,
273
- &settings.vm_service_port )) {
274
- FML_LOG (INFO)
275
- << " VM Service port specified was malformed. Will default to "
276
- << settings.vm_service_port ;
277
- }
278
- } else if (command_line.HasOption (
279
- FlagForSwitch (Switch::DeviceObservatoryPort))) {
280
- // TODO(bkonyi): remove once flutter_tools no longer uses this option.
281
- // See https://github.com/dart-lang/sdk/issues/50233
258
+ // Set Observatory Port
259
+ if (command_line.HasOption (FlagForSwitch (Switch::DeviceObservatoryPort))) {
282
260
if (!GetSwitchValue (command_line, Switch::DeviceObservatoryPort,
283
- &settings.vm_service_port )) {
261
+ &settings.observatory_port )) {
284
262
FML_LOG (INFO)
285
- << " VM Service port specified was malformed. Will default to "
286
- << settings.vm_service_port ;
263
+ << " Observatory port specified was malformed. Will default to "
264
+ << settings.observatory_port ;
287
265
}
288
266
}
289
267
0 commit comments