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

Side by Side Diff: util/win/process_info.cc

Issue 1407643004: Some plumbing for the beginning of getting handles into snapshot/minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@handles-redux
Patch Set: . Created 5 years, 2 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
« util/win/process_info.h ('K') | « util/win/process_info.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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 594 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
595 return memory_info_; 595 return memory_info_;
596 } 596 }
597 597
598 std::vector<CheckedRange<WinVMAddress, WinVMSize>> 598 std::vector<CheckedRange<WinVMAddress, WinVMSize>>
599 ProcessInfo::GetReadableRanges( 599 ProcessInfo::GetReadableRanges(
600 const CheckedRange<WinVMAddress, WinVMSize>& range) const { 600 const CheckedRange<WinVMAddress, WinVMSize>& range) const {
601 return GetReadableRangesOfMemoryMap(range, MemoryInfo()); 601 return GetReadableRangesOfMemoryMap(range, MemoryInfo());
602 } 602 }
603 603
604 const std::vector<ProcessInfo::Handle>& ProcessInfo::Handles() { 604 const std::vector<ProcessInfo::Handle>& ProcessInfo::Handles() const {
605 INITIALIZATION_STATE_DCHECK_VALID(initialized_); 605 INITIALIZATION_STATE_DCHECK_VALID(initialized_);
606 if (handles_.empty()) 606 if (handles_.empty())
607 handles_ = BuildHandleVector(process_); 607 handles_ = BuildHandleVector(process_);
608 return handles_; 608 return handles_;
609 } 609 }
610 610
611 std::vector<CheckedRange<WinVMAddress, WinVMSize>> GetReadableRangesOfMemoryMap( 611 std::vector<CheckedRange<WinVMAddress, WinVMSize>> GetReadableRangesOfMemoryMap(
612 const CheckedRange<WinVMAddress, WinVMSize>& range, 612 const CheckedRange<WinVMAddress, WinVMSize>& range,
613 const std::vector<MEMORY_BASIC_INFORMATION64>& memory_info) { 613 const std::vector<MEMORY_BASIC_INFORMATION64>& memory_info) {
614 using Range = CheckedRange<WinVMAddress, WinVMSize>; 614 using Range = CheckedRange<WinVMAddress, WinVMSize>;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } else { 664 } else {
665 result.push_back(as_ranges[i]); 665 result.push_back(as_ranges[i]);
666 } 666 }
667 DCHECK(result.back().IsValid()); 667 DCHECK(result.back().IsValid());
668 } 668 }
669 669
670 return result; 670 return result;
671 } 671 }
672 672
673 } // namespace crashpad 673 } // namespace crashpad
OLDNEW
« util/win/process_info.h ('K') | « util/win/process_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698