Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8755)

Unified Diff: chrome/browser/ui/webui/PRESUBMIT.py

Issue 2890513003: Move chrome/browser/web_dev_style/ to tools/ to use from more places (Closed)
Patch Set: tsergeant@ review Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/PRESUBMIT.py ('k') | chrome/browser/web_dev_style/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/PRESUBMIT.py
diff --git a/chrome/browser/ui/webui/PRESUBMIT.py b/chrome/browser/ui/webui/PRESUBMIT.py
new file mode 100644
index 0000000000000000000000000000000000000000..29efca16ab79d0a2bc7a6323d7e7f24cfb90957e
--- /dev/null
+++ b/chrome/browser/ui/webui/PRESUBMIT.py
@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+"""Presubmit script for files in chrome/browser/ui/webui.
+
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details about the presubmit API built into depot_tools.
+"""
+
+
+def _CheckWebDevStyle(input_api, output_api):
+ results = []
+ try:
+ import sys
+ old_sys_path = sys.path
+ cwd = input_api.PresubmitLocalPath()
+ sys.path += [input_api.os_path.join(cwd, '..', '..', '..', '..', 'tools')]
+ import web_dev_style.presubmit_support
+ results = web_dev_style.presubmit_support.CheckStyle(input_api, output_api)
+ finally:
+ sys.path = old_sys_path
+ return results
+
+
+def CheckChangeOnUpload(input_api, output_api):
+ return _CheckWebDevStyle(input_api, output_api)
+
+
+def CheckChangeOnCommit(input_api, output_api):
+ return _CheckWebDevStyle(input_api, output_api)
« no previous file with comments | « chrome/browser/resources/PRESUBMIT.py ('k') | chrome/browser/web_dev_style/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698