brave-browser#51098 Replace std::unique_ptr<std::string> with std::optional<std::string> in SimpleURLLoader::DownloadToString* callbacks
State: closed (completed) · created · closed · updated · discovered via linked:brave/brave-core#32658
QA/No release-notes/exclude feature/web3/wallet OS/Desktop OS/iOS feature/web3/wallet/core code-health
SimpleURLLoader still includes the BodyAsStringCallbackDeprecated callback that uses std::unique_ptr to represent an optional response body. This approach forces every caller to deal with dynamic allocation even though the pointer is only used as a nullable indicator. A newer BodyAsStringCallback already exists using std::optional , which is a clearer and more appropriate way without heap allocation.
Timeline (7 of 10 events)
- 2025-12-03 15:03 Referenced by brave-core#32658 by tmancey
- 2025-12-12 13:46 Closed
completedbrave-core#32658 by tmancey - 2025-12-12 13:47 Milestone set
1.87.x - Nightlyby brave-builds - 2025-12-15 16:26 Label added
QA/Noby tmancey - 2025-12-15 16:26 Label added
release-notes/excludeby tmancey - 2025-12-15 16:26 Label added
OS/Desktopby tmancey - 2025-12-15 16:27 Label added
OS/iOSby tmancey