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

Unified Diff: components/policy/resources/PRESUBMIT.py

Issue 108513011: Move chrome/app/policy into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « components/policy/resources/OWNERS ('k') | components/policy/resources/policy_templates.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/resources/PRESUBMIT.py
diff --git a/chrome/app/policy/PRESUBMIT.py b/components/policy/resources/PRESUBMIT.py
similarity index 94%
rename from chrome/app/policy/PRESUBMIT.py
rename to components/policy/resources/PRESUBMIT.py
index 91f24c475e8ecab02ca4bb3371e4ad33902a6732..3870875aa379667a0dc5c6d59e95347b8e3934b3 100644
--- a/chrome/app/policy/PRESUBMIT.py
+++ b/components/policy/resources/PRESUBMIT.py
@@ -26,13 +26,15 @@ def _GetPolicyTemplates(template_path):
return list(itertools.chain(policies, subpolicies))
def _CheckPolicyTemplatesSyntax(input_api, output_api):
- filepath = input_api.os_path.join(input_api.PresubmitLocalPath(),
- 'policy_templates.json')
+ local_path = input_api.PresubmitLocalPath()
+ filepath = input_api.os_path.join(local_path, 'policy_templates.json')
if any(f.AbsoluteLocalPath() == filepath
for f in input_api.AffectedFiles()):
old_sys_path = sys.path
try:
- sys.path = [input_api.PresubmitLocalPath()] + sys.path
+ tools_path = input_api.os_path.normpath(
+ input_api.os_path.join(local_path, input_api.os_path.pardir, 'tools'))
+ sys.path = [ tools_path ] + sys.path
# Optimization: only load this when it's needed.
import syntax_check_policy_template_json
checker = syntax_check_policy_template_json.PolicyTemplateChecker()
« no previous file with comments | « components/policy/resources/OWNERS ('k') | components/policy/resources/policy_templates.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698