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

Unified Diff: grit/format/policy_templates/writers/plist_writer.py

Issue 227073006: Added a policy writer for iOS Plists. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Created 6 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
Index: grit/format/policy_templates/writers/plist_writer.py
diff --git a/grit/format/policy_templates/writers/plist_writer.py b/grit/format/policy_templates/writers/plist_writer.py
index 46b7adec8d19eb641c9bf5daba1402683e408044..22978581ea4e19740adb69c4b7bd4b4e38921b24 100644
--- a/grit/format/policy_templates/writers/plist_writer.py
+++ b/grit/format/policy_templates/writers/plist_writer.py
@@ -127,13 +127,16 @@ class PListWriter(xml_formatted_writer.XMLFormattedWriter):
self._array = self._AddKeyValuePair(dict, 'pfm_subkeys', 'array')
- def Init(self):
+ def CreatePlistDocument(self):
dom_impl = minidom.getDOMImplementation('')
doctype = dom_impl.createDocumentType(
'plist',
'-//Apple//DTD PLIST 1.0//EN',
'http://www.apple.com/DTDs/PropertyList-1.0.dtd')
- self._doc = dom_impl.createDocument(None, 'plist', doctype)
+ return dom_impl.createDocument(None, 'plist', doctype)
+
+ def Init(self):
+ self._doc = self.CreatePlistDocument()
self._plist = self._doc.documentElement
def GetTemplateText(self):

Powered by Google App Engine
This is Rietveld 408576698