• Nigel Tao's avatar
    Check JSON value instead of error_code · 198130ea
    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: I0fe1f6d5debb837b6e7abab6fdfa0fd6a8a22e02
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2143190Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
    Commit-Queue: Nigel Tao <nigeltao@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#759058}
    198130ea
device_policy_decoder_chromeos.cc 74.5 KB