Commit c7ca3e53 authored by Eric Roman's avatar Eric Roman Committed by Commit Bot

Make use of new hex decoding function for color chooser.

Bug: 1021236
Change-Id: Id03f517e8a5ed285c695d51b54182f99d3c91fb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904866
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Eric Roman <eroman@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713906}
parent 18a03b96
......@@ -56,8 +56,8 @@ bool GetColorFromText(const base::string16& text, SkColor* result) {
std::string input =
base::UTF16ToUTF8((text.size() == 6) ? text : text.substr(1));
std::vector<uint8_t> hex;
if (!base::HexStringToBytes(input, &hex))
std::array<uint8_t, 3> hex;
if (!base::HexStringToSpan(input, hex))
return false;
*result = SkColorSetRGB(hex[0], hex[1], hex[2]);
......
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