Avoid conversion between GURL and std::string
ProfileDownloader::GetProfilePictureURL returns a std::string corresponding to the representation of a GURL then immediately converts it back to a GURL. This is wasteful, so convert this method to return a GURL instead and convert GetCachedPictureURL to also cache the GURL instead of the string representation. Convert static std::string to static char[] and use EXPECT_ instead of ASSERT_ macros when possible in unit tests (since the EXPECT_ macro do not stop the test in case of failure). Bug: none Change-Id: Ibe73f28b38b2061b37cbdb0b9b0696b25ca8c41c Reviewed-on: https://chromium-review.googlesource.com/1160645 Commit-Queue: Sylvain Defresne <sdefresne@chromium.org> Reviewed-by:Bernhard Bauer <bauerb@chromium.org> Reviewed-by:
Jacob Dufault <jdufault@chromium.org> Reviewed-by:
Mihai Sardarescu <msarda@chromium.org> Cr-Commit-Position: refs/heads/master@{#585426}
Showing
Please register or sign in to comment