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

Side by Side Diff: snapshot/test/test_process_snapshot.cc

Issue 998033002: Carry the client ID from the database all the way through upload (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/test/test_process_snapshot.h ('k') | no next file » | 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,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "snapshot/exception_snapshot.h" 15 #include "snapshot/exception_snapshot.h"
16 #include "snapshot/system_snapshot.h" 16 #include "snapshot/system_snapshot.h"
17 #include "snapshot/test/test_process_snapshot.h" 17 #include "snapshot/test/test_process_snapshot.h"
18 18
19 namespace crashpad { 19 namespace crashpad {
20 namespace test { 20 namespace test {
21 21
22 TestProcessSnapshot::TestProcessSnapshot() 22 TestProcessSnapshot::TestProcessSnapshot()
23 : process_id_(0), 23 : process_id_(0),
24 parent_process_id_(0), 24 parent_process_id_(0),
25 snapshot_time_(), 25 snapshot_time_(),
26 process_start_time_(), 26 process_start_time_(),
27 process_cpu_user_time_(), 27 process_cpu_user_time_(),
28 process_cpu_system_time_(), 28 process_cpu_system_time_(),
29 client_id_(),
29 annotations_simple_map_(), 30 annotations_simple_map_(),
30 system_(), 31 system_(),
31 threads_(), 32 threads_(),
32 modules_(), 33 modules_(),
33 exception_() { 34 exception_() {
34 } 35 }
35 36
36 TestProcessSnapshot::~TestProcessSnapshot() { 37 TestProcessSnapshot::~TestProcessSnapshot() {
37 } 38 }
38 39
(...skipping 12 matching lines...) Expand all
51 void TestProcessSnapshot::ProcessStartTime(timeval* start_time) const { 52 void TestProcessSnapshot::ProcessStartTime(timeval* start_time) const {
52 *start_time = process_start_time_; 53 *start_time = process_start_time_;
53 } 54 }
54 55
55 void TestProcessSnapshot::ProcessCPUTimes(timeval* user_time, 56 void TestProcessSnapshot::ProcessCPUTimes(timeval* user_time,
56 timeval* system_time) const { 57 timeval* system_time) const {
57 *user_time = process_cpu_user_time_; 58 *user_time = process_cpu_user_time_;
58 *system_time = process_cpu_system_time_; 59 *system_time = process_cpu_system_time_;
59 } 60 }
60 61
62 void TestProcessSnapshot::ClientID(UUID* client_id) const {
63 *client_id = client_id_;
64 }
65
61 const std::map<std::string, std::string>& 66 const std::map<std::string, std::string>&
62 TestProcessSnapshot::AnnotationsSimpleMap() const { 67 TestProcessSnapshot::AnnotationsSimpleMap() const {
63 return annotations_simple_map_; 68 return annotations_simple_map_;
64 } 69 }
65 70
66 const SystemSnapshot* TestProcessSnapshot::System() const { 71 const SystemSnapshot* TestProcessSnapshot::System() const {
67 return system_.get(); 72 return system_.get();
68 } 73 }
69 74
70 std::vector<const ThreadSnapshot*> TestProcessSnapshot::Threads() const { 75 std::vector<const ThreadSnapshot*> TestProcessSnapshot::Threads() const {
(...skipping 11 matching lines...) Expand all
82 } 87 }
83 return modules; 88 return modules;
84 } 89 }
85 90
86 const ExceptionSnapshot* TestProcessSnapshot::Exception() const { 91 const ExceptionSnapshot* TestProcessSnapshot::Exception() const {
87 return exception_.get(); 92 return exception_.get();
88 } 93 }
89 94
90 } // namespace test 95 } // namespace test
91 } // namespace crashpad 96 } // namespace crashpad
OLDNEW
« no previous file with comments | « snapshot/test/test_process_snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698