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

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

Issue 1483073004: Replace use of .Pass() with crashpad::move(). (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: pass: . Created 5 years 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 | « util/win/exception_handler_server.cc ('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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (status == STATUS_INFO_LENGTH_MISMATCH) { 143 if (status == STATUS_INFO_LENGTH_MISMATCH) {
144 DCHECK_GT(return_length, size); 144 DCHECK_GT(return_length, size);
145 size = return_length; 145 size = return_length;
146 buffer.reset(new uint8_t[size]); 146 buffer.reset(new uint8_t[size]);
147 status = crashpad::NtQueryObject( 147 status = crashpad::NtQueryObject(
148 handle, object_information_class, buffer.get(), size, &return_length); 148 handle, object_information_class, buffer.get(), size, &return_length);
149 } 149 }
150 150
151 if (!NT_SUCCESS(status)) { 151 if (!NT_SUCCESS(status)) {
152 NTSTATUS_LOG(ERROR, status) << "NtQueryObject"; 152 NTSTATUS_LOG(ERROR, status) << "NtQueryObject";
153 return scoped_ptr<uint8_t[]>(); 153 return nullptr;
154 } 154 }
155 155
156 DCHECK_GE(return_length, minimum_size); 156 DCHECK_GE(return_length, minimum_size);
157 return buffer.Pass(); 157 return buffer;
158 } 158 }
159 159
160 } // namespace 160 } // namespace
161 161
162 template <class Traits> 162 template <class Traits>
163 bool GetProcessBasicInformation(HANDLE process, 163 bool GetProcessBasicInformation(HANDLE process,
164 bool is_wow64, 164 bool is_wow64,
165 ProcessInfo* process_info, 165 ProcessInfo* process_info,
166 WinVMAddress* peb_address, 166 WinVMAddress* peb_address,
167 WinVMSize* peb_size) { 167 WinVMSize* peb_size) {
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } else { 683 } else {
684 result.push_back(as_ranges[i]); 684 result.push_back(as_ranges[i]);
685 } 685 }
686 DCHECK(result.back().IsValid()); 686 DCHECK(result.back().IsValid());
687 } 687 }
688 688
689 return result; 689 return result;
690 } 690 }
691 691
692 } // namespace crashpad 692 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/win/exception_handler_server.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698