• Bao-Duy Tran's avatar
    Merge util GetInputMethodShortName() into OO GetIndicator(). · 064a6218
    Bao-Duy Tran authored
    Despite being called "util", InputMethodUtil is a stateful class (!)
    Despite being member of stateful class InputMethodUtil, actually
    GetInputMethodShortName() is stateless; it's a static util method (!)
    
    Except for minor difference in the return type, it operates only on
    a non-null InputMethodDescriptor instance and is functionally identical
    to properly object-oriented InputMethodDescriptor::GetIndicator(). The
    latter is never used anywhere else other than by the former (!)
    
    In an attempt to reduce unnecessarily random bags of static utils
    and promote object-oriented-ness where it deserves for readability,
    let's fully merge InputMethodUtil::GetInputMethodShortName() into
    InputMethodDescriptor::GetIndicator().
    
    Bug: 1162216
    Change-Id: I085d89ec97bdab03872df696efdb1bcee6865112
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2601013Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarMy Nguyen <myy@chromium.org>
    Reviewed-by: default avatarDarren Shen <shend@chromium.org>
    Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
    Commit-Queue: Bao-Duy Tran <tranbaoduy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#840486}
    064a6218
input_method_util_unittest.cc 15.5 KB