PRESUBMIT #include check: don't add a warning if we're committing.

This enables the commit queue to commit patches where the #include order is
"wrong" according to the check.

NOTRY=true
BUG=


Review URL: https://chromiumcodereview.appspot.com/11496010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172084 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ff620c1..9acfcb28 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -619,8 +619,13 @@
 
   results = []
   if warnings:
-    results.append(output_api.PresubmitPromptWarning(_INCLUDE_ORDER_WARNING,
-                                                     warnings))
+    if not input_api.is_committing:
+      results.append(output_api.PresubmitPromptWarning(_INCLUDE_ORDER_WARNING,
+                                                       warnings))
+    else:
+      # We don't warn on commit, to avoid stopping commits going through CQ.
+      results.append(output_api.PresubmitNotifyResult(_INCLUDE_ORDER_WARNING,
+                                                      warnings))
   return results