Changed the CheckBaseMacrosInHeaders presubmit to pass over C++ comments

[email protected],[email protected]
BUG=545272

Review URL: https://codereview.chromium.org/1413263002

Cr-Commit-Position: refs/heads/master@{#355639}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 67b5182..e3ee9c47 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -1506,7 +1506,7 @@
         f.LocalPath().endswith('.hpp') or f.LocalPath().endswith('.inl')):
       contents = input_api.ReadFile(f)
       for line in contents.splitlines(False):
-        if (not input_api.re.match(r'//', line) and # Strip C++ comment.
+        if (not line.lstrip().startswith('//') and # Strip C++ comment.
             pattern.search(line)):
           files.append(f)
           break
@@ -1532,6 +1532,8 @@
     if not f.LocalPath().endswith('.h'):
       continue
     for line_num, line in f.ChangedContents():
+      if line.lstrip().startswith('//'):  # Strip C++ comment.
+        continue
       if any(d in line for d in disallows):
         contents = input_api.ReadFile(f)
         if not (macros in contents or basictypes in contents):