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 1314093002: Refactor handler/main for Windows, implement CrashHandlerExceptionServer (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crash-handler-exe
Patch Set: fixes2 Created 5 years, 3 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 a831266411d906a014282aad3e46228b55c33665..278d6e1dbf2c75f50eeee99a11fb9c3bcb878292 100644
--- a/util/win/exception_handler_server.cc
+++ b/util/win/exception_handler_server.cc
@@ -184,9 +184,8 @@ class ClientData {
ExceptionHandlerServer::Delegate::~Delegate() {
}
-ExceptionHandlerServer::ExceptionHandlerServer(Delegate* delegate)
- : delegate_(delegate),
- port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
+ExceptionHandlerServer::ExceptionHandlerServer()
+ : port_(CreateIoCompletionPort(INVALID_HANDLE_VALUE, nullptr, 0, 1)),
clients_lock_(),
clients_() {
}
@@ -194,7 +193,8 @@ ExceptionHandlerServer::ExceptionHandlerServer(Delegate* delegate)
ExceptionHandlerServer::~ExceptionHandlerServer() {
}
-void ExceptionHandlerServer::Run(const std::string& pipe_name) {
+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.
@@ -217,7 +217,7 @@ void ExceptionHandlerServer::Run(const std::string& pipe_name) {
internal::PipeServiceContext* context =
new internal::PipeServiceContext(port_.get(),
pipe,
- delegate_,
+ delegate,
&clients_lock_,
&clients_,
shutdown_token);
@@ -225,7 +225,7 @@ void ExceptionHandlerServer::Run(const std::string& pipe_name) {
CreateThread(nullptr, 0, &PipeServiceProc, context, 0, nullptr));
}
- delegate_->ExceptionHandlerServerStarted();
+ delegate->ExceptionHandlerServerStarted();
// This is the main loop of the server. Most work is done on the threadpool,
// other than process end handling which is posted back to this main thread,
« 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