Don't use CHECK() to quit browser on bad field trial command line.
CHECK() produces crashes and sometimes these are prevalent enough for crash triagers to file and ping crbugs about, which just wastes everyone's time. This changes the CHECKs to a printed message via puts and an exit() call. Differentiates between invalid variation ids coming from command line vs. those from about:flags and uses a NOTREACHED in the latter case. Also, cleans up the code a bit by changing the APIs around passing additional variation ids - making the param const and making a helper function private. Also fixes some lint errors around includes and header guards. BUG=812164 TBR=sky@chromium.org,rohitrao@chromium.org Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Id765738791ada14540ff51fe5f6fc837dd42e7c7 Reviewed-on: https://chromium-review.googlesource.com/919194Reviewed-by:Scott Violet <sky@chromium.org> Reviewed-by:
Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:
Ilya Sherman <isherman@chromium.org> Commit-Queue: Alexei Svitkine <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#537516}
Showing
Please register or sign in to comment