| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from crash.culprit import Culprit | 5 from crash.culprit import Culprit |
| 6 | 6 |
| 7 | 7 |
| 8 # TODO(http://crbug.com/659346): write coverage tests. | 8 # TODO(http://crbug.com/659346): write coverage tests. |
| 9 class Predator(object): # pragma: no cover | 9 class Predator(object): # pragma: no cover |
| 10 """The Main entry point into the Predator library.""" | 10 """The Main entry point into the Predator library.""" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 suspected_project = ( | 22 suspected_project = ( |
| 23 self.project_classifier.ClassifySuspects(suspected_cls) or | 23 self.project_classifier.ClassifySuspects(suspected_cls) or |
| 24 self.project_classifier.ClassifyCallStack( | 24 self.project_classifier.ClassifyCallStack( |
| 25 report.stacktrace.crash_stack)) | 25 report.stacktrace.crash_stack)) |
| 26 | 26 |
| 27 suspected_components = ( | 27 suspected_components = ( |
| 28 self.component_classifier.ClassifySuspects(suspected_cls) or | 28 self.component_classifier.ClassifySuspects(suspected_cls) or |
| 29 self.component_classifier.ClassifyCallStack( | 29 self.component_classifier.ClassifyCallStack( |
| 30 report.stacktrace.crash_stack)) | 30 report.stacktrace.crash_stack)) |
| 31 | 31 |
| 32 return Culprit( | 32 return Culprit(project=suspected_project, |
| 33 project = suspected_project, | 33 components=suspected_components, |
| 34 components = suspected_components, | 34 cls=suspected_cls, |
| 35 cls = suspected_cls, | 35 regression_range=report.regression_range, |
| 36 regression_range = report.regression_range, | 36 algorithm='core_algorithm') |
| 37 algorithm = 'core_algorithm') | |
| OLD | NEW |