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

Side by Side Diff: snapshot/mac/process_snapshot_mac.h

Issue 1000263003: Add MinidumpCrashpadInfo::report_id (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « minidump/minidump_extensions.h ('k') | snapshot/mac/process_snapshot_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 //! otherwise with an appropriate message logged. When this method returns 70 //! otherwise with an appropriate message logged. When this method returns
71 //! `false`, the ProcessSnapshotMac object’s validity remains unchanged. 71 //! `false`, the ProcessSnapshotMac object’s validity remains unchanged.
72 bool InitializeException(thread_t exception_thread, 72 bool InitializeException(thread_t exception_thread,
73 exception_type_t exception, 73 exception_type_t exception,
74 const mach_exception_data_type_t* code, 74 const mach_exception_data_type_t* code,
75 mach_msg_type_number_t code_count, 75 mach_msg_type_number_t code_count,
76 thread_state_flavor_t flavor, 76 thread_state_flavor_t flavor,
77 const natural_t* state, 77 const natural_t* state,
78 mach_msg_type_number_t state_count); 78 mach_msg_type_number_t state_count);
79 79
80 //! \brief Sets the value to be returned by ReportID().
81 //!
82 //! On Mac OS X, the crash report ID is under the control of the snapshot
83 //! producer, which may call this method to set the report ID. If this is not
84 //! done, ReportID() will return an identifier consisting entirely of zeroes.
85 void SetReportID(const UUID& report_id) { report_id_ = report_id; }
86
80 //! \brief Sets the value to be returned by ClientID(). 87 //! \brief Sets the value to be returned by ClientID().
81 //! 88 //!
82 //! On Mac OS X, the client ID is under the control of the snapshot producer, 89 //! On Mac OS X, the client ID is under the control of the snapshot producer,
83 //! which may call this method to set the client ID. If this is not done, 90 //! which may call this method to set the client ID. If this is not done,
84 //! ClientID() will return an identifier consisting entirely of zeroes. 91 //! ClientID() will return an identifier consisting entirely of zeroes.
85 void SetClientID(const UUID& client_id) { client_id_ = client_id; } 92 void SetClientID(const UUID& client_id) { client_id_ = client_id; }
86 93
87 //! \brief Sets the value to be returned by AnnotationsSimpleMap(). 94 //! \brief Sets the value to be returned by AnnotationsSimpleMap().
88 //! 95 //!
89 //! On Mac OS X, all process annotations are under the control of the snapshot 96 //! On Mac OS X, all process annotations are under the control of the snapshot
(...skipping 12 matching lines...) Expand all
102 //! the process. 109 //! the process.
103 void GetCrashpadOptions(CrashpadInfoClientOptions* options); 110 void GetCrashpadOptions(CrashpadInfoClientOptions* options);
104 111
105 // ProcessSnapshot: 112 // ProcessSnapshot:
106 113
107 pid_t ProcessID() const override; 114 pid_t ProcessID() const override;
108 pid_t ParentProcessID() const override; 115 pid_t ParentProcessID() const override;
109 void SnapshotTime(timeval* snapshot_time) const override; 116 void SnapshotTime(timeval* snapshot_time) const override;
110 void ProcessStartTime(timeval* start_time) const override; 117 void ProcessStartTime(timeval* start_time) const override;
111 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; 118 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override;
119 void ReportID(UUID* report_id) const override;
112 void ClientID(UUID* client_id) const override; 120 void ClientID(UUID* client_id) const override;
113 const std::map<std::string, std::string>& AnnotationsSimpleMap() 121 const std::map<std::string, std::string>& AnnotationsSimpleMap()
114 const override; 122 const override;
115 const SystemSnapshot* System() const override; 123 const SystemSnapshot* System() const override;
116 std::vector<const ThreadSnapshot*> Threads() const override; 124 std::vector<const ThreadSnapshot*> Threads() const override;
117 std::vector<const ModuleSnapshot*> Modules() const override; 125 std::vector<const ModuleSnapshot*> Modules() const override;
118 const ExceptionSnapshot* Exception() const override; 126 const ExceptionSnapshot* Exception() const override;
119 127
120 private: 128 private:
121 // Initializes threads_ on behalf of Initialize(). 129 // Initializes threads_ on behalf of Initialize().
122 void InitializeThreads(); 130 void InitializeThreads();
123 131
124 // Initializes modules_ on behalf of Initialize(). 132 // Initializes modules_ on behalf of Initialize().
125 void InitializeModules(); 133 void InitializeModules();
126 134
127 internal::SystemSnapshotMac system_; 135 internal::SystemSnapshotMac system_;
128 PointerVector<internal::ThreadSnapshotMac> threads_; 136 PointerVector<internal::ThreadSnapshotMac> threads_;
129 PointerVector<internal::ModuleSnapshotMac> modules_; 137 PointerVector<internal::ModuleSnapshotMac> modules_;
130 scoped_ptr<internal::ExceptionSnapshotMac> exception_; 138 scoped_ptr<internal::ExceptionSnapshotMac> exception_;
131 ProcessReader process_reader_; 139 ProcessReader process_reader_;
140 UUID report_id_;
132 UUID client_id_; 141 UUID client_id_;
133 std::map<std::string, std::string> annotations_simple_map_; 142 std::map<std::string, std::string> annotations_simple_map_;
134 timeval snapshot_time_; 143 timeval snapshot_time_;
135 InitializationStateDcheck initialized_; 144 InitializationStateDcheck initialized_;
136 145
137 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); 146 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac);
138 }; 147 };
139 148
140 } // namespace crashpad 149 } // namespace crashpad
141 150
142 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ 151 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_
OLDNEW
« no previous file with comments | « minidump/minidump_extensions.h ('k') | snapshot/mac/process_snapshot_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698