Commit 0d5dd28c authored by Owen Min's avatar Owen Min Committed by Commit Bot

Update system log uploader to use new Policy conversions.

Include user policies depends on the parameters.
Include device information.

Use default value of no convert value, convert policy type and enable
pretty print.

Bug: 983174
Change-Id: I3882d0f7f5cc0497e9b897c29d0263e7194d09e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1721377Reviewed-by: default avatarPavol Marko <pmarko@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682319}
parent 69a69ce0
...@@ -173,9 +173,12 @@ std::string SystemLogDelegate::GetPolicyAsJSON() { ...@@ -173,9 +173,12 @@ std::string SystemLogDelegate::GetPolicyAsJSON() {
user_manager::UserManager::Get()->GetPrimaryUser()->IsAffiliated(); user_manager::UserManager::Get()->GetPrimaryUser()->IsAffiliated();
} }
} }
return policy::GetAllPolicyValuesAsJSON( return policy::DictionaryPolicyConversions()
ProfileManager::GetActiveUserProfile(), include_user_policies, .WithBrowserContext(ProfileManager::GetActiveUserProfile())
true /* with_device_data */, true /* is_pretty_print */); .EnableUserPolicies(include_user_policies)
.EnableDevicePolicies(true)
.EnableDeviceInfo(true)
.ToJSON();
} }
void SystemLogDelegate::LoadSystemLogs(LogUploadCallback upload_callback) { void SystemLogDelegate::LoadSystemLogs(LogUploadCallback upload_callback) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment