Commit 0c20e440 authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Add Presubmit for changing CSD proto definitions without changing the WebUI logging

Bug: 852922
Change-Id: I2db33fb3dd5f13dda3420965e72d8aa92695ffe5
Reviewed-on: https://chromium-review.googlesource.com/1103539
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568086}
parent e98748af
# Copyright 2018 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.
def CheckChangeOnUpload(input_api, output_api):
# Warn if the proto file is not modified without also modifying
# the WebUI.
proto_path = 'components/safe_browsing/proto/csd.proto'
web_ui_path = 'components/safe_browsing/web_ui/safe_browsing_ui.cc'
if proto_path in input_api.change.LocalPaths() and \
not web_ui_path in input_api.change.LocalPaths():
return [
output_api.PresubmitPromptWarning(
'You modified the one or more of the CSD protos in: \n'
' ' + proto_path + '\n'
'without changing the WebUI in: \n'
' ' + web_ui_path + '\n')
]
return []
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment