| 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 import logging | 5 import logging |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from crash import detect_regression_range | 9 from crash import detect_regression_range |
| 10 from crash.changelist_classifier import ChangelistClassifier | 10 from crash.changelist_classifier import ChangelistClassifier |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 logging.warning('FinditForChromeCrash is abstract, ' | 42 logging.warning('FinditForChromeCrash is abstract, ' |
| 43 'but someone constructed an instance and called _ClientID') | 43 'but someone constructed an instance and called _ClientID') |
| 44 else: | 44 else: |
| 45 logging.warning( | 45 logging.warning( |
| 46 'FinditForChromeCrash subclass %s forgot to implement _ClientID', | 46 'FinditForChromeCrash subclass %s forgot to implement _ClientID', |
| 47 cls.__name__) | 47 cls.__name__) |
| 48 raise NotImplementedError() | 48 raise NotImplementedError() |
| 49 | 49 |
| 50 # TODO(http://crbug.com/659354): remove the dependency on CrashConfig | 50 # TODO(http://crbug.com/659354): remove the dependency on CrashConfig |
| 51 # entirely, by passing the relevant data as arguments to this constructor. | 51 # entirely, by passing the relevant data as arguments to this constructor. |
| 52 def __init__(self, repository, pipeline_cls): | 52 def __init__(self, repository): |
| 53 super(FinditForChromeCrash, self).__init__(repository, pipeline_cls) | 53 super(FinditForChromeCrash, self).__init__(repository) |
| 54 component_classifier_config = CrashConfig.Get().component_classifier | 54 component_classifier_config = CrashConfig.Get().component_classifier |
| 55 | 55 |
| 56 self._stacktrace_parser = ChromeCrashParser() | 56 self._stacktrace_parser = ChromeCrashParser() |
| 57 | 57 |
| 58 # For how these two "top n" differ, see http://crbug.com/644476#c4 | 58 # For how these two "top n" differ, see http://crbug.com/644476#c4 |
| 59 self._predator = Predator( | 59 self._predator = Predator( |
| 60 cl_classifier = ChangelistClassifier( | 60 cl_classifier = ChangelistClassifier( |
| 61 repository = repository, | 61 repository = repository, |
| 62 top_n_frames = self.config.get('top_n', _DEFAULT_TOP_N)), | 62 top_n_frames = self.config.get('top_n', _DEFAULT_TOP_N)), |
| 63 component_classifier = ComponentClassifier( | 63 component_classifier = ComponentClassifier( |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 def _ClientID(cls): | 150 def _ClientID(cls): |
| 151 return CrashClient.FRACAS | 151 return CrashClient.FRACAS |
| 152 | 152 |
| 153 def CreateAnalysis(self, crash_identifiers): | 153 def CreateAnalysis(self, crash_identifiers): |
| 154 # TODO: inline FracasCrashAnalysis.Create stuff here. | 154 # TODO: inline FracasCrashAnalysis.Create stuff here. |
| 155 return FracasCrashAnalysis.Create(crash_identifiers) | 155 return FracasCrashAnalysis.Create(crash_identifiers) |
| 156 | 156 |
| 157 def GetAnalysis(self, crash_identifiers): | 157 def GetAnalysis(self, crash_identifiers): |
| 158 # TODO: inline FracasCrashAnalysis.Get stuff here. | 158 # TODO: inline FracasCrashAnalysis.Get stuff here. |
| 159 return FracasCrashAnalysis.Get(crash_identifiers) | 159 return FracasCrashAnalysis.Get(crash_identifiers) |
| OLD | NEW |