commit | efda77e5347b395818856b0afb012fcbb55e628b | [log] [tgz] |
---|---|---|
author | Sebastien Marchand <[email protected]> | Fri Jan 25 22:53:52 2019 |
committer | Sébastien Marchand <[email protected]> | Fri Jan 25 22:53:52 2019 |
tree | ed9441d0ef82644885962445ef3e83496bb11e8b | |
parent | e2f4e0000f12ebbce0ad1cc109fb8a1f2a861d49 [diff] |
Include base/timer/timer.h in the files that use it. Gab, I've used your refactoring script for this, the rule is: content = refactor_lib.ReadFile(file_path) # Assume fwd-decls are correct in first pass. if 'class OneShotTimer;' in content: return False if 'class RepeatingTimer;' in content: return False if 'class RetainingOneShotTimer;' in content: return False matches = re.compile(r'(\n *[^/\n][^/\n][^/\n]*base::(OneShotTimer|RepeatingTimer|RetainingOneShotTimer)\b[^*])', re.DOTALL).findall(content) if not matches: return False found = False for match in matches: constant = 'YADAYADA' match_mod = match[0].replace('OneShotTimer', constant).replace('RepeatingTimer', constant).replace('RetainingOneShotTimer', constant).replace('const ', '') if not 'std::unique_ptr<base::%s' % constant in match_mod: found = True break if not found: return False updated_content = refactor_lib.AddInclude(file_path, content, "base/timer/timer.h") if updated_content == content: return False # Write updated file refactor_lib.WriteFile(file_path, updated_content) [email protected] Change-Id: I5a6a19371e5d7dc864ce9c8ae117e9ee9d54dd80 Reviewed-on: https://chromium-review.googlesource.com/c/1435748 Reviewed-by: Sébastien Marchand <[email protected]> Reviewed-by: Gabriel Charette <[email protected]> Commit-Queue: Sébastien Marchand <[email protected]> Cr-Commit-Position: refs/heads/master@{#626245}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .