Files
brave-core/components/api_request_helper
Terry Mancey 8e588d2591 [CodeHealth] Replace std::unique_ptr<std::string> with std::optional<std::string> in SimpleURLLoader::DownloadToString* callbacks (#32658)
SimpleURLLoader still includes the BodyAsStringCallbackDeprecated
callback that uses std::unique_ptr<std::string> 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<std::string>,
which is a clearer and more appropriate way without heap allocation.
2025-12-12 08:46:39 -05:00
..