| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 class _Info(object): | 5 class _Info(object): |
| 6 | 6 |
| 7 def __init__(self, name, _type=None): | 7 def __init__(self, name, _type=None): |
| 8 self._name = name | 8 self._name = name |
| 9 self._type = _type | 9 self._type = _type |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 TRACE_START = _Info('trace start', 'DateRange') | 48 TRACE_START = _Info('trace start', 'DateRange') |
| 49 TRACE_URLS = _Info('trace urls', 'GenericSet') | 49 TRACE_URLS = _Info('trace urls', 'GenericSet') |
| 50 V8_COMMIT_POSITIONS = _Info('v8 commit positions', 'DateRange') | 50 V8_COMMIT_POSITIONS = _Info('v8 commit positions', 'DateRange') |
| 51 V8_REVISIONS = _Info('v8 revisions', 'GenericSet') | 51 V8_REVISIONS = _Info('v8 revisions', 'GenericSet') |
| 52 WEBRTC_REVISIONS = _Info('webrtc revisions', 'GenericSet') | 52 WEBRTC_REVISIONS = _Info('webrtc revisions', 'GenericSet') |
| 53 | 53 |
| 54 # DEPRECATED https://github.com/catapult-project/catapult/issues/3507 | 54 # DEPRECATED https://github.com/catapult-project/catapult/issues/3507 |
| 55 BUILDBOT = _Info('buildbot') # BuildbotInfo or MergedBuildbotInfo | 55 BUILDBOT = _Info('buildbot') # BuildbotInfo or MergedBuildbotInfo |
| 56 INTERACTION_RECORD = _Info('tir', 'GenericSet') | 56 INTERACTION_RECORD = _Info('tir', 'GenericSet') |
| 57 ITERATION = _Info('iteration') # Legacy name for TELEMETRY | 57 ITERATION = _Info('iteration') # Legacy name for TELEMETRY |
| 58 REVISIONS = _Info('revisions') # RevisionInfo or MergedRevisionInfo | |
| 59 TELEMETRY = _Info('telemetry') # TelemetryInfo or MergedTelemetryInfo | 58 TELEMETRY = _Info('telemetry') # TelemetryInfo or MergedTelemetryInfo |
| 60 | 59 |
| 61 def GetTypeForName(name): | 60 def GetTypeForName(name): |
| 62 for info in globals().itervalues(): | 61 for info in globals().itervalues(): |
| 63 if isinstance(info, _Info) and info.name == name: | 62 if isinstance(info, _Info) and info.name == name: |
| 64 return info.type | 63 return info.type |
| OLD | NEW |