# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


"""Top-level presubmit script for GYP.

See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""


def CheckChangeOnUpload(input_api, output_api):
  report = []
  report.extend(input_api.canned_checks.PanProjectChecks(
      input_api, output_api))
  return report


def CheckChangeOnCommit(input_api, output_api):
  report = []
  report.extend(input_api.canned_checks.PanProjectChecks(
      input_api, output_api))
  report.extend(input_api.canned_checks.CheckTreeIsOpen(
      input_api, output_api,
      'http://gyp-status.appspot.com/status',
      'http://gyp-status.appspot.com/current'))
  return report


def GetPreferredTrySlaves():
  return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac']

@@ -18,28 +18,18 @@
 011 
-The Chromium Authors
+Google Inc
 . Al
@@ -552,32 +552,320 @@
 :%0A  report = %5B%5D%0A
+  license = (%0A      r'.*? Copyright %5C(c%5C) %25(year)s Google Inc%5C. All rights reserved%5C.%5Cn'%0A      r'.*? Use of this source code is governed by a BSD-style license that '%0A        r'can be%5Cn'%0A      r'.*? found in the LICENSE file%5C.%5Cn'%0A  ) %25 %7B%0A      'year': input_api.time.strftime('%25Y'),%0A  %7D%0A%0A
   report.extend(
@@ -929,24 +929,48 @@
 , output_api
+, license_header=license
 ))%0A  report.

Fix the license header regex.