diff options
Diffstat (limited to 'toolkit/components/glean/bindings/jog/src/lib.rs')
-rw-r--r-- | toolkit/components/glean/bindings/jog/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toolkit/components/glean/bindings/jog/src/lib.rs b/toolkit/components/glean/bindings/jog/src/lib.rs index b62e54f6e8..e1ea60b7ad 100644 --- a/toolkit/components/glean/bindings/jog/src/lib.rs +++ b/toolkit/components/glean/bindings/jog/src/lib.rs @@ -139,6 +139,8 @@ pub extern "C" fn jog_test_register_ping( send_if_empty: bool, precise_timestamps: bool, include_info_sections: bool, + enabled: bool, + schedules_pings: &ThinVec<nsCString>, reason_codes: &ThinVec<nsCString>, ) -> u32 { let ping_name = name.to_string(); @@ -146,12 +148,18 @@ pub extern "C" fn jog_test_register_ping( .iter() .map(|reason| reason.to_string()) .collect(); + let schedules_pings = schedules_pings + .iter() + .map(|ping| ping.to_string()) + .collect(); create_and_register_ping( ping_name, include_client_id, send_if_empty, precise_timestamps, include_info_sections, + enabled, + schedules_pings, reason_codes, ) .expect("Creation or registration of ping failed.") // permitted to panic in test-only method. @@ -163,6 +171,8 @@ fn create_and_register_ping( send_if_empty: bool, precise_timestamps: bool, include_info_sections: bool, + enabled: bool, + schedules_pings: Vec<String>, reason_codes: Vec<String>, ) -> Result<u32, Box<dyn std::error::Error>> { let ns_name = nsCString::from(&ping_name); @@ -172,6 +182,8 @@ fn create_and_register_ping( send_if_empty, precise_timestamps, include_info_sections, + enabled, + schedules_pings, reason_codes, ); extern "C" { @@ -219,6 +231,8 @@ struct PingDefinitionData { send_if_empty: bool, precise_timestamps: bool, include_info_sections: bool, + enabled: bool, + schedules_pings: Option<Vec<String>>, reason_codes: Option<Vec<String>>, } @@ -266,6 +280,8 @@ pub extern "C" fn jog_load_jogfile(jogfile_path: &nsAString) -> bool { ping.send_if_empty, ping.precise_timestamps, ping.include_info_sections, + ping.enabled, + ping.schedules_pings.unwrap_or_else(Vec::new), ping.reason_codes.unwrap_or_else(Vec::new), ); } |