Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Side by Side Diff: appengine/findit/model/crash/chrome_crash_analysis.py

Issue 2663063007: [Predator] Switch from anonymous dict to CrashData. (Closed)
Patch Set: Rebase and fix delta test. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 google.appengine.ext import ndb 5 from google.appengine.ext import ndb
6 6
7 from model.crash.crash_analysis import CrashAnalysis 7 from model.crash.crash_analysis import CrashAnalysis
8 8
9 9
10 class ChromeCrashAnalysis(CrashAnalysis): 10 class ChromeCrashAnalysis(CrashAnalysis):
11 """Represents an analysis of a Chrome Crash (Cracas or Fracas).""" 11 """Represents an analysis of a Chrome Crash (Cracas or Fracas)."""
12 # Customized properties for Fracas crash. 12 # Customized properties for Fracas crash.
13 historical_metadata = ndb.JsonProperty(indexed=False) 13 historical_metadata = ndb.JsonProperty(indexed=False)
14 channel = ndb.StringProperty(indexed=False) 14 channel = ndb.StringProperty(indexed=False)
15 15
16 def Reset(self): 16 def Reset(self):
17 super(ChromeCrashAnalysis, self).Reset() 17 super(ChromeCrashAnalysis, self).Reset()
18 self.historical_metadata = None 18 self.historical_metadata = None
19 self.channel = None 19 self.channel = None
20 20
21 @property 21 def Initialize(self, crash_data):
22 def customized_data(self): 22 """(Re)Initializes a CrashAnalysis ndb.Model from ``ChromeCrashData``."""
23 return {'historical_metadata': self.historical_metadata, 23 super(ChromeCrashAnalysis, self).Initialize(crash_data)
24 'channel': self.channel} 24 self.channel = crash_data.channel
25 self.historical_metadata = crash_data.historical_metadata
OLDNEW
« no previous file with comments | « appengine/findit/handlers/crash/test/triage_fracas_analysis_test.py ('k') | appengine/findit/model/crash/crash_analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698