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

Side by Side Diff: third_party/crashpad/crashpad/util/posix/process_info_mac.cc

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 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
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 all_groups.insert(EffectiveGroupID()); 125 all_groups.insert(EffectiveGroupID());
126 all_groups.insert(SavedGroupID()); 126 all_groups.insert(SavedGroupID());
127 return all_groups; 127 return all_groups;
128 } 128 }
129 129
130 bool ProcessInfo::DidChangePrivileges() const { 130 bool ProcessInfo::DidChangePrivileges() const {
131 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 131 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
132 return kern_proc_info_.kp_proc.p_flag & P_SUGID; 132 return kern_proc_info_.kp_proc.p_flag & P_SUGID;
133 } 133 }
134 134
135 bool ProcessInfo::Is64Bit() const { 135 bool ProcessInfo::Is64Bit(bool* is_64_bit) const {
136 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 136 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
137 return kern_proc_info_.kp_proc.p_flag & P_LP64; 137 *is_64_bit = kern_proc_info_.kp_proc.p_flag & P_LP64;
138 return true;
138 } 139 }
139 140
140 void ProcessInfo::StartTime(timeval* start_time) const { 141 bool ProcessInfo::StartTime(timeval* start_time) const {
141 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 142 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
142 *start_time = kern_proc_info_.kp_proc.p_starttime; 143 *start_time = kern_proc_info_.kp_proc.p_starttime;
144 return true;
143 } 145 }
144 146
145 bool ProcessInfo::Arguments(std::vector<std::string>* argv) const { 147 bool ProcessInfo::Arguments(std::vector<std::string>* argv) const {
146 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 148 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
147 149
148 // The format of KERN_PROCARGS2 is explained in 10.9.2 adv_cmds-153/ps/print.c 150 // The format of KERN_PROCARGS2 is explained in 10.9.2 adv_cmds-153/ps/print.c
149 // getproclline(). It is an int (argc) followed by the executable’s string 151 // getproclline(). It is an int (argc) followed by the executable’s string
150 // area. The string area consists of NUL-terminated strings, beginning with 152 // area. The string area consists of NUL-terminated strings, beginning with
151 // the executable path, and then starting on an aligned boundary, all of the 153 // the executable path, and then starting on an aligned boundary, all of the
152 // elements of argv, envp, and applev. 154 // elements of argv, envp, and applev.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // Not every argument was recovered. 226 // Not every argument was recovered.
225 LOG(ERROR) << "did not recover all arguments"; 227 LOG(ERROR) << "did not recover all arguments";
226 return false; 228 return false;
227 } 229 }
228 230
229 argv->swap(local_argv); 231 argv->swap(local_argv);
230 return true; 232 return true;
231 } 233 }
232 234
233 } // namespace crashpad 235 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698