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

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

Issue 1408123006: Tidy up to enable C4800 on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 1 month 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') | util/win/process_info_test.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 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 bool IsProcessWow64(HANDLE process_handle) { 52 bool IsProcessWow64(HANDLE process_handle) {
53 static const auto is_wow64_process = 53 static const auto is_wow64_process =
54 GET_FUNCTION(L"kernel32.dll", ::IsWow64Process); 54 GET_FUNCTION(L"kernel32.dll", ::IsWow64Process);
55 if (!is_wow64_process) 55 if (!is_wow64_process)
56 return false; 56 return false;
57 BOOL is_wow64; 57 BOOL is_wow64;
58 if (!is_wow64_process(process_handle, &is_wow64)) { 58 if (!is_wow64_process(process_handle, &is_wow64)) {
59 PLOG(ERROR) << "IsWow64Process"; 59 PLOG(ERROR) << "IsWow64Process";
60 return false; 60 return false;
61 } 61 }
62 return is_wow64; 62 return !!is_wow64;
63 } 63 }
64 64
65 template <class T> 65 template <class T>
66 bool ReadUnicodeString(HANDLE process, 66 bool ReadUnicodeString(HANDLE process,
67 const process_types::UNICODE_STRING<T>& us, 67 const process_types::UNICODE_STRING<T>& us,
68 std::wstring* result) { 68 std::wstring* result) {
69 if (us.Length == 0) { 69 if (us.Length == 0) {
70 result->clear(); 70 result->clear();
71 return true; 71 return true;
72 } 72 }
(...skipping 610 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') | util/win/process_info_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698