| Index: appengine/findit/crash/findit_for_chromecrash.py
|
| diff --git a/appengine/findit/crash/findit_for_chromecrash.py b/appengine/findit/crash/findit_for_chromecrash.py
|
| index 58efaa519a0a7a7405bd6684b624402cd488f176..70d32b03c477386e244c3a2ef22cec64f44b735f 100644
|
| --- a/appengine/findit/crash/findit_for_chromecrash.py
|
| +++ b/appengine/findit/crash/findit_for_chromecrash.py
|
| @@ -6,6 +6,7 @@ import logging
|
|
|
| from google.appengine.ext import ndb
|
|
|
| +from common import appengine_util
|
| from crash import detect_regression_range
|
| from crash.changelist_classifier import ChangelistClassifier
|
| from crash.chromecrash_parser import ChromeCrashParser
|
| @@ -22,7 +23,7 @@ from model.crash.fracas_crash_analysis import FracasCrashAnalysis
|
| # TODO(katesonia): Remove the default value after adding validity check to
|
| # config.
|
| _DEFAULT_TOP_N = 7
|
| -
|
| +_FRACAS_FEEDBACK_URL_TEMPLATE = '%s/crash/fracas-result-feedback?key=%s'
|
|
|
| # TODO(wrengr): [Note#1] in many places below we have to do some ugly
|
| # defaulting in case crash_data is missing certain keys. If we had
|
| @@ -129,6 +130,12 @@ class FinditForChromeCrash(Findit):
|
| crash_data['platform'] = self.RenamePlatform(platform)
|
| return crash_data
|
|
|
| + def ProcessResultForPublishing(self, result, key): # pragma: no cover.
|
| + """Client specific processing of result data for publishing."""
|
| + # This method needs to get overwritten by subclasses FinditForCracas and
|
| + # FinditForFracas.
|
| + raise NotImplementedError()
|
| +
|
|
|
| # TODO(http://crbug.com/659346): we misplaced the coverage tests; find them!
|
| class FinditForCracas(FinditForChromeCrash): # pragma: no cover
|
| @@ -144,6 +151,12 @@ class FinditForCracas(FinditForChromeCrash): # pragma: no cover
|
| # TODO: inline CracasCrashAnalysis.Get stuff here.
|
| return CracasCrashAnalysis.Get(crash_identifiers)
|
|
|
| + def ProcessResultForPublishing(self, result, key): # pragma: no cover.
|
| + """Cracas specific processing of result data for publishing."""
|
| + # TODO(katesonia) Add feedback page link information to result after
|
| + # feedback page of Cracas is added.
|
| + return result
|
| +
|
|
|
| class FinditForFracas(FinditForChromeCrash):
|
| @classmethod
|
| @@ -157,3 +170,9 @@ class FinditForFracas(FinditForChromeCrash):
|
| def GetAnalysis(self, crash_identifiers):
|
| # TODO: inline FracasCrashAnalysis.Get stuff here.
|
| return FracasCrashAnalysis.Get(crash_identifiers)
|
| +
|
| + def ProcessResultForPublishing(self, result, key):
|
| + """Fracas specific processing of result data for publishing."""
|
| + result['feedback_url'] = _FRACAS_FEEDBACK_URL_TEMPLATE % (
|
| + appengine_util.GetDefaultVersionHostname(), key)
|
| + return result
|
|
|