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

Unified Diff: snapshot/win/exception_snapshot_win_test.cc

Issue 1402333004: win: Construct ExceptionHandlerServer() with its pipe argument (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
Index: snapshot/win/exception_snapshot_win_test.cc
diff --git a/snapshot/win/exception_snapshot_win_test.cc b/snapshot/win/exception_snapshot_win_test.cc
index 7c3b3691409cb682b626a3239eca8cbd3984c6d3..fe626a3873ef7ed6d63e90b5ec674881b474a0c1 100644
--- a/snapshot/win/exception_snapshot_win_test.cc
+++ b/snapshot/win/exception_snapshot_win_test.cc
@@ -41,18 +41,16 @@ class RunServerThread : public Thread {
public:
// Instantiates a thread which will invoke server->Run(delegate, pipe_name);
RunServerThread(ExceptionHandlerServer* server,
- ExceptionHandlerServer::Delegate* delegate,
- const std::string& pipe_name)
- : server_(server), delegate_(delegate), pipe_name_(pipe_name) {}
+ ExceptionHandlerServer::Delegate* delegate)
+ : server_(server), delegate_(delegate) {}
~RunServerThread() override {}
private:
// Thread:
- void ThreadMain() override { server_->Run(delegate_, pipe_name_); }
+ void ThreadMain() override { server_->Run(delegate_); }
ExceptionHandlerServer* server_;
ExceptionHandlerServer::Delegate* delegate_;
- std::string pipe_name_;
DISALLOW_COPY_AND_ASSIGN(RunServerThread);
};
@@ -130,9 +128,8 @@ void TestCrashingChild(const base::string16& directory_modification) {
ScopedKernelHANDLE completed(CreateEvent(nullptr, false, false, nullptr));
CrashingDelegate delegate(server_ready.get(), completed.get());
- ExceptionHandlerServer exception_handler_server;
- RunServerThread server_thread(
- &exception_handler_server, &delegate, pipe_name);
+ ExceptionHandlerServer exception_handler_server(pipe_name);
+ RunServerThread server_thread(&exception_handler_server, &delegate);
server_thread.Start();
ScopedStopServerAndJoinThread scoped_stop_server_and_join_thread(
&exception_handler_server, &server_thread);
@@ -233,9 +230,8 @@ void TestDumpWithoutCrashingChild(
ScopedKernelHANDLE completed(CreateEvent(nullptr, false, false, nullptr));
SimulateDelegate delegate(server_ready.get(), completed.get());
- ExceptionHandlerServer exception_handler_server;
- RunServerThread server_thread(
- &exception_handler_server, &delegate, pipe_name);
+ ExceptionHandlerServer exception_handler_server(pipe_name);
+ RunServerThread server_thread(&exception_handler_server, &delegate);
server_thread.Start();
ScopedStopServerAndJoinThread scoped_stop_server_and_join_thread(
&exception_handler_server, &server_thread);

Powered by Google App Engine
This is Rietveld 408576698