• arthursonzogni's avatar
    bfcache: Refresh labels for histogram disabled reasons. · 04afc39a
    arthursonzogni authored
    Generated using:
    ~~
    directories="content chrome components"
    regex="DisableForRenderFrameHost(\(([^\(\)]++|(?1))*\))"
    label=$(grep -Pzoh $regex -r $directories \
             | tr -d '\000' \
             | grep -Po '\"[^"]+"' \
             | tr -d '"' \
             | sort -u
    )
    
    echo "<enum name=\"BackForwardCacheDisabledForRenderFrameHostReason\">"
    for i in $label
    do
      hash=$(echo -n $i | md5sum | tr -d ' -')
      hash=${hash^^}
      hash=$(echo $hash | head -c 16)
      hash=$(echo "ibase=16; $hash" | bc)
      hash=$(echo "($hash + (2^31)) % (2^32) - 2^31" | bc)
      echo "  <int value=\"$hash\" label=\"$i\"/>"
    done
    echo "</enum>"
    ~~
    
    Bug: 1001087
    Change-Id: Id2f11f608f7ef8341fb22c3befa56b9d5a28d6e7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910234
    Commit-Queue: Alexander Timin <altimin@chromium.org>
    Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#714565}
    04afc39a
enums.xml 2.88 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.