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

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

Issue 1463633002: win: Avoid some more clang complaints (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@vm-counters-struct
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 | « client/crashpad_client_win.cc ('k') | util/win/process_info.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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 if (!LoggingReadFile(service_context.pipe(), &message, sizeof(message))) 439 if (!LoggingReadFile(service_context.pipe(), &message, sizeof(message)))
440 return false; 440 return false;
441 441
442 switch (message.type) { 442 switch (message.type) {
443 case ClientToServerMessage::kShutdown: { 443 case ClientToServerMessage::kShutdown: {
444 if (message.shutdown.token != service_context.shutdown_token()) { 444 if (message.shutdown.token != service_context.shutdown_token()) {
445 LOG(ERROR) << "forged shutdown request, got: " 445 LOG(ERROR) << "forged shutdown request, got: "
446 << message.shutdown.token; 446 << message.shutdown.token;
447 return false; 447 return false;
448 } 448 }
449 ServerToClientMessage shutdown_response = {0}; 449 ServerToClientMessage shutdown_response = {};
450 LoggingWriteFile(service_context.pipe(), 450 LoggingWriteFile(service_context.pipe(),
451 &shutdown_response, 451 &shutdown_response,
452 sizeof(shutdown_response)); 452 sizeof(shutdown_response));
453 return true; 453 return true;
454 } 454 }
455 455
456 case ClientToServerMessage::kRegister: 456 case ClientToServerMessage::kRegister:
457 // Handled below. 457 // Handled below.
458 break; 458 break;
459 459
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 void __stdcall ExceptionHandlerServer::OnProcessEnd(void* ctx, BOOLEAN) { 592 void __stdcall ExceptionHandlerServer::OnProcessEnd(void* ctx, BOOLEAN) {
593 // This function is executed on the thread pool. 593 // This function is executed on the thread pool.
594 internal::ClientData* client = reinterpret_cast<internal::ClientData*>(ctx); 594 internal::ClientData* client = reinterpret_cast<internal::ClientData*>(ctx);
595 base::AutoLock lock(*client->lock()); 595 base::AutoLock lock(*client->lock());
596 596
597 // Post back to the main thread to have it delete this client record. 597 // Post back to the main thread to have it delete this client record.
598 PostQueuedCompletionStatus(client->port(), 0, ULONG_PTR(client), nullptr); 598 PostQueuedCompletionStatus(client->port(), 0, ULONG_PTR(client), nullptr);
599 } 599 }
600 600
601 } // namespace crashpad 601 } // namespace crashpad
OLDNEW
« no previous file with comments | « client/crashpad_client_win.cc ('k') | util/win/process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698