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

Unified Diff: util/win/exception_handler_server.cc

Issue 1424213005: win: Construct ExceptionHandlerServer() with its pipe argument (again) (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 aba3ffa0c016494b9a6262b0764ba859a5ee2cca..234d3149ec94333b18425dda926ac66a5a30b50e 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -234,8 +234,9 @@ class ClientData {
ExceptionHandlerServer::Delegate::~Delegate() {
}
-ExceptionHandlerServer::ExceptionHandlerServer()
- : port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
+ExceptionHandlerServer::ExceptionHandlerServer(const std::string& pipe_name)
+ : pipe_name_(pipe_name),
+ port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
clients_lock_(),
clients_() {
}
@@ -243,13 +244,12 @@ ExceptionHandlerServer::ExceptionHandlerServer()
ExceptionHandlerServer::~ExceptionHandlerServer() {
}
-void ExceptionHandlerServer::Run(Delegate* delegate,
- const std::string& pipe_name) {
+void ExceptionHandlerServer::Run(Delegate* delegate) {
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(base::UTF8ToUTF16(pipe_name),
+ SendToCrashHandlerServer(pipe_name_16,
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