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

Unified Diff: components/policy/tools/remove_localized_app_restrictions.py

Issue 1062213002: Remove localized App Restrictions resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 8 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 | « components/policy/resources/policy_templates.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/tools/remove_localized_app_restrictions.py
diff --git a/components/policy/tools/remove_localized_app_restrictions.py b/components/policy/tools/remove_localized_app_restrictions.py
new file mode 100755
index 0000000000000000000000000000000000000000..89ddf88675a360961aa1cd999d38089f1532cc4c
--- /dev/null
+++ b/components/policy/tools/remove_localized_app_restrictions.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# Copyright 2015 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.
+
+'''python %prog resources_dir
+
+resources_dir specifies the root directory of the localized app restrictions
+resources to purge'''
+
+import os
+import re
+import sys
+
+def main(resources_dir):
+ match = re.compile('^values-.*-v21$')
+ for dir in os.listdir(resources_dir):
+ if match.search(dir):
+ path = os.path.join(resources_dir, dir)
+ os.remove(os.path.join(path, 'restriction_values.xml'))
+ os.rmdir(path)
+ open(os.path.join(resources_dir, 'remove_localized_resources.d.stamp'), 'w')
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1]))
« no previous file with comments | « components/policy/resources/policy_templates.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698