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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader.py

Issue 2256793002: Make docstrings more consistent using format-webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make indentation of final quote based on parse tree (indentation prior to docstring node) rather th… Created 4 years, 3 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 (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 19 matching lines...) Expand all
30 class DumpReader(object): 30 class DumpReader(object):
31 """Base class for breakpad dump readers.""" 31 """Base class for breakpad dump readers."""
32 32
33 def __init__(self, host, build_dir): 33 def __init__(self, host, build_dir):
34 self._host = host 34 self._host = host
35 self._build_dir = build_dir 35 self._build_dir = build_dir
36 36
37 def check_is_functional(self): 37 def check_is_functional(self):
38 """This routine must be implemented by subclasses. 38 """This routine must be implemented by subclasses.
39 39
40 Returns True if this reader is functional.""" 40 Returns True if this reader is functional.
41 """
41 raise NotImplementedError() 42 raise NotImplementedError()
42 43
43 def crash_dumps_directory(self): 44 def crash_dumps_directory(self):
44 return self._host.filesystem.join(self._build_dir, 'crash-dumps') 45 return self._host.filesystem.join(self._build_dir, 'crash-dumps')
45 46
46 def clobber_old_results(self): 47 def clobber_old_results(self):
47 if self._host.filesystem.isdir(self.crash_dumps_directory()): 48 if self._host.filesystem.isdir(self.crash_dumps_directory()):
48 self._host.filesystem.rmtree(self.crash_dumps_directory()) 49 self._host.filesystem.rmtree(self.crash_dumps_directory())
49 50
50 def look_for_new_crash_logs(self, crashed_processes, start_time): 51 def look_for_new_crash_logs(self, crashed_processes, start_time):
(...skipping 18 matching lines...) Expand all
69 if str(pid) in pid_to_minidump: 70 if str(pid) in pid_to_minidump:
70 stack = self._get_stack_from_dump(pid_to_minidump[str(pid)]) 71 stack = self._get_stack_from_dump(pid_to_minidump[str(pid)])
71 if stack: 72 if stack:
72 result[test] = stack 73 result[test] = stack
73 74
74 return result 75 return result
75 76
76 def _get_pid_from_dump(self, dump_file): 77 def _get_pid_from_dump(self, dump_file):
77 """This routine must be implemented by subclasses. 78 """This routine must be implemented by subclasses.
78 79
79 This routine returns the PID of the crashed process that produced the gi ven dump_file.""" 80 This routine returns the PID of the crashed process that produced the gi ven dump_file.
81 """
80 raise NotImplementedError() 82 raise NotImplementedError()
81 83
82 def _get_stack_from_dump(self, dump_file): 84 def _get_stack_from_dump(self, dump_file):
83 """This routine must be implemented by subclasses. 85 """This routine must be implemented by subclasses.
84 86
85 Returns the stack stored in the given breakpad dump_file.""" 87 Returns the stack stored in the given breakpad dump_file.
88 """
86 raise NotImplementedError() 89 raise NotImplementedError()
87 90
88 def _file_extension(self): 91 def _file_extension(self):
89 """This routine must be implemented by subclasses. 92 """This routine must be implemented by subclasses.
90 93
91 Returns the file extension of crash dumps written by breakpad.""" 94 Returns the file extension of crash dumps written by breakpad.
95 """
92 raise NotImplementedError() 96 raise NotImplementedError()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698