| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
const std::string* b64_value = metadata_dict->FindString(kValue);i dont think you need b64 unless you are actively converting it server-side?
i thought it came down in serialized bytes?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
const std::string* b64_value = metadata_dict->FindString(kValue);i dont think you need b64 unless you are actively converting it server-side?
i thought it came down in serialized bytes?
Because Chrome requests this data as HTTP/JSON (`application/json`), the server response undergoes OnePlatform transcoding.
If we were to use standard `google.protobuf.Any`:
Since Chromium parses the outer response dynamically as a JSON dictionary to avoid compiling the outer `GetPromptForWebPropertyResponse` proto wrapper, it cannot easily parse this unpacked structured JSON back into a raw protobuf blob without local descriptors.
Using `SerializedAny` (flat `string type_url` and `bytes value`) forces the transcoder to treat the payload as standard fields, representing the payload as base64-encoded bytes. Chrome can then easily decode the base64 and reconstruct `optimization_guide::proto::Any` using descriptors it already has.
Alternative Considered (Binary Protobuf): We could bypass JSON transcoding entirely by requesting binary data (`Accept: application/x-protobuf`) and using `google.protobuf.Any` directly. However, this would require importing and compiling the outer `GetPromptForWebPropertyResponse` proto definitions directly into Chromium, which I'm not sure we want to do as part of it. But I guess we have to decide before we submit these changes!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |