Bug 1277806 - Add support for the keyed scalars to the scalar registry. r=gfritzsche

MozReview-Commit-ID: 8dKj92Kh2Ev
This commit is contained in:
Alessio Placitelli
2016-09-07 02:39:00 +02:00
parent a7415ba76a
commit 1a9fc61a87
3 changed files with 11 additions and 3 deletions

View File

@@ -86,7 +86,8 @@ class ScalarType:
OPTIONAL_FIELDS = {
'cpp_guard': basestring,
'release_channel_collection': basestring
'release_channel_collection': basestring,
'keyed': bool
}
# The types for the data within the fields that hold lists.
@@ -192,6 +193,11 @@ class ScalarType:
"""Get the scalar kind"""
return self._definition['kind']
@property
def keyed(self):
"""Boolean indicating whether this is a keyed scalar"""
return self._definition.get('keyed', False)
@property
def nsITelemetry_kind(self):
"""Get the scalar kind constant defined in nsITelemetry"""