• Nigel Tao's avatar
    Check JSON value instead of error_code · 3113b722
    Nigel Tao authored
    Checking (result.error_code != JSON_NO_ERROR) is equivalent to checking
    result.value (which has a base::Optional type, convertible to bool).
    
    The error_code enum is really a private implementation detail. Callers
    don't care about it (other than it being an error or no error). Removing
    references (outside of //base/json) to that enum will let us more easily
    modify the //base/json implementation.
    
    Bug: 1070409
    Change-Id: I54b8e787b5c1469efff77fda48d72a4d7251f7f0
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2147401Reviewed-by: default avatarJia Meng <jiameng@chromium.org>
    Commit-Queue: Nigel Tao <nigeltao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#759060}
    3113b722
trial_group_checker.cc 4.03 KB