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

Side by Side Diff: snapshot/test/test_process_snapshot.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 | « snapshot/process_snapshot.h ('k') | snapshot/test/test_process_snapshot.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 snapshot_time_ = snapshot_time; 51 snapshot_time_ = snapshot_time;
52 } 52 }
53 void SetProcessStartTime(const timeval& start_time) { 53 void SetProcessStartTime(const timeval& start_time) {
54 process_start_time_ = start_time; 54 process_start_time_ = start_time;
55 } 55 }
56 void SetProcessCPUTimes(const timeval& user_time, 56 void SetProcessCPUTimes(const timeval& user_time,
57 const timeval& system_time) { 57 const timeval& system_time) {
58 process_cpu_user_time_ = user_time; 58 process_cpu_user_time_ = user_time;
59 process_cpu_system_time_ = system_time; 59 process_cpu_system_time_ = system_time;
60 } 60 }
61 void SetReportID(const UUID& report_id) { report_id_ = report_id; }
61 void SetClientID(const UUID& client_id) { client_id_ = client_id; } 62 void SetClientID(const UUID& client_id) { client_id_ = client_id; }
62 void SetAnnotationsSimpleMap( 63 void SetAnnotationsSimpleMap(
63 const std::map<std::string, std::string>& annotations_simple_map) { 64 const std::map<std::string, std::string>& annotations_simple_map) {
64 annotations_simple_map_ = annotations_simple_map; 65 annotations_simple_map_ = annotations_simple_map;
65 } 66 }
66 67
67 //! \brief Sets the system snapshot to be returned by System(). 68 //! \brief Sets the system snapshot to be returned by System().
68 //! 69 //!
69 //! \param[in] system The system snapshot that System() will return. The 70 //! \param[in] system The system snapshot that System() will return. The
70 //! TestProcessSnapshot object takes ownership of \a system. 71 //! TestProcessSnapshot object takes ownership of \a system.
(...skipping 23 matching lines...) Expand all
94 exception_ = exception.Pass(); 95 exception_ = exception.Pass();
95 } 96 }
96 97
97 // ProcessSnapshot: 98 // ProcessSnapshot:
98 99
99 pid_t ProcessID() const override; 100 pid_t ProcessID() const override;
100 pid_t ParentProcessID() const override; 101 pid_t ParentProcessID() const override;
101 void SnapshotTime(timeval* snapshot_time) const override; 102 void SnapshotTime(timeval* snapshot_time) const override;
102 void ProcessStartTime(timeval* start_time) const override; 103 void ProcessStartTime(timeval* start_time) const override;
103 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override; 104 void ProcessCPUTimes(timeval* user_time, timeval* system_time) const override;
105 void ReportID(UUID* report_id) const override;
104 void ClientID(UUID* client_id) const override; 106 void ClientID(UUID* client_id) const override;
105 const std::map<std::string, std::string>& AnnotationsSimpleMap() 107 const std::map<std::string, std::string>& AnnotationsSimpleMap()
106 const override; 108 const override;
107 const SystemSnapshot* System() const override; 109 const SystemSnapshot* System() const override;
108 std::vector<const ThreadSnapshot*> Threads() const override; 110 std::vector<const ThreadSnapshot*> Threads() const override;
109 std::vector<const ModuleSnapshot*> Modules() const override; 111 std::vector<const ModuleSnapshot*> Modules() const override;
110 const ExceptionSnapshot* Exception() const override; 112 const ExceptionSnapshot* Exception() const override;
111 113
112 private: 114 private:
113 pid_t process_id_; 115 pid_t process_id_;
114 pid_t parent_process_id_; 116 pid_t parent_process_id_;
115 timeval snapshot_time_; 117 timeval snapshot_time_;
116 timeval process_start_time_; 118 timeval process_start_time_;
117 timeval process_cpu_user_time_; 119 timeval process_cpu_user_time_;
118 timeval process_cpu_system_time_; 120 timeval process_cpu_system_time_;
121 UUID report_id_;
119 UUID client_id_; 122 UUID client_id_;
120 std::map<std::string, std::string> annotations_simple_map_; 123 std::map<std::string, std::string> annotations_simple_map_;
121 scoped_ptr<SystemSnapshot> system_; 124 scoped_ptr<SystemSnapshot> system_;
122 PointerVector<ThreadSnapshot> threads_; 125 PointerVector<ThreadSnapshot> threads_;
123 PointerVector<ModuleSnapshot> modules_; 126 PointerVector<ModuleSnapshot> modules_;
124 scoped_ptr<ExceptionSnapshot> exception_; 127 scoped_ptr<ExceptionSnapshot> exception_;
125 128
126 DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot); 129 DISALLOW_COPY_AND_ASSIGN(TestProcessSnapshot);
127 }; 130 };
128 131
129 } // namespace test 132 } // namespace test
130 } // namespace crashpad 133 } // namespace crashpad
131 134
132 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_PROCESS_SNAPSHOT_H_ 135 #endif // CRASHPAD_SNAPSHOT_TEST_TEST_PROCESS_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « snapshot/process_snapshot.h ('k') | snapshot/test/test_process_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698