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

Unified Diff: util/win/exception_handler_server.cc

Issue 1409073013: mac: Make crashpad_handler get its receive right from its client (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/exception_handler_server.cc
diff --git a/util/win/exception_handler_server.cc b/util/win/exception_handler_server.cc
index 234d3149ec94333b18425dda926ac66a5a30b50e..aba3ffa0c016494b9a6262b0764ba859a5ee2cca 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -234,9 +234,8 @@ class ClientData {
ExceptionHandlerServer::Delegate::~Delegate() {
}
-ExceptionHandlerServer::ExceptionHandlerServer(const std::string& pipe_name)
- : pipe_name_(pipe_name),
- port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
+ExceptionHandlerServer::ExceptionHandlerServer()
+ : port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
clients_lock_(),
clients_() {
}
@@ -244,12 +243,13 @@ ExceptionHandlerServer::ExceptionHandlerServer(const std::string& pipe_name)
ExceptionHandlerServer::~ExceptionHandlerServer() {
}
-void ExceptionHandlerServer::Run(Delegate* delegate) {
+void ExceptionHandlerServer::Run(Delegate* delegate,
+ const std::string& pipe_name) {
uint64_t shutdown_token = base::RandUint64();
// We create two pipe instances, so that there's one listening while the
// PipeServiceProc is processing a registration.
ScopedKernelHANDLE thread_handles[2];
- base::string16 pipe_name_16(base::UTF8ToUTF16(pipe_name_));
+ base::string16 pipe_name_16(base::UTF8ToUTF16(pipe_name));
for (int i = 0; i < arraysize(thread_handles); ++i) {
HANDLE pipe =
CreateNamedPipe(pipe_name_16.c_str(),
@@ -311,7 +311,7 @@ void ExceptionHandlerServer::Run(Delegate* delegate) {
message.type = ClientToServerMessage::kShutdown;
message.shutdown.token = shutdown_token;
ServerToClientMessage response;
- SendToCrashHandlerServer(pipe_name_16,
+ SendToCrashHandlerServer(base::UTF8ToUTF16(pipe_name),
reinterpret_cast<ClientToServerMessage&>(message),
&response);
}
« no previous file with comments | « util/win/exception_handler_server.h ('k') | util/win/exception_handler_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698