Fixit: Add PRESUBMIT check for TimeXXX::To/FromInternalValue().
The fix-it to remove the uses of To/FromInternalValue() is underway. This change adds a PRESUBMIT warning (BANNED_CPP_FUNCTIONS) and base/time/time.h header comments, to avoid having new code use these deprecated functions. The intention is for this change to be short-lived, and removed once the deprecated functions are removed from the time classes. One fault in the check: Since the script can only do regexp matching, it's impossible to check that the ToInternalValue() method is being called on one of the TimeXXX types. However, there are relatively few non-TimeXXX types that have a ToInternalValue() method. Therefore, it should be rare for the script to trigger a warning erroneously (and this would be easy to bypass, anyway). Bug: 634507 Change-Id: I48d75435703771107c87935cb3ea90a5a956989e Reviewed-on: https://chromium-review.googlesource.com/577980Reviewed-by:Paweł Hajdan Jr. <phajdan.jr@chromium.org> Commit-Queue: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/heads/master@{#488505}
Showing
Please register or sign in to comment