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

Unified Diff: client/crashpad_client_win.cc

Issue 1406993008: win: Rename CrashpadClient::SetHandler() to SetHandlerIPCPipe() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Revise comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/crashpad_client.h ('k') | handler/handler.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/crashpad_client_win.cc
diff --git a/client/crashpad_client_win.cc b/client/crashpad_client_win.cc
index 5e7346facffc63ad21524932ae1a940ca38fee03..c4715ad518ddb7b334e75575771fc9b9cfe99dd2 100644
--- a/client/crashpad_client_win.cc
+++ b/client/crashpad_client_win.cc
@@ -115,7 +115,7 @@ std::wstring FormatArgumentString(const std::string& name,
namespace crashpad {
CrashpadClient::CrashpadClient()
- : ipc_port_() {
+ : ipc_pipe_() {
}
CrashpadClient::~CrashpadClient() {
@@ -127,13 +127,14 @@ bool CrashpadClient::StartHandler(
const std::string& url,
const std::map<std::string, std::string>& annotations,
const std::vector<std::string>& arguments) {
- DCHECK(ipc_port_.empty());
+ DCHECK(ipc_pipe_.empty());
- ipc_port_ =
+ std::string ipc_pipe =
base::StringPrintf("\\\\.\\pipe\\crashpad_%d_", GetCurrentProcessId());
for (int index = 0; index < 16; ++index) {
- ipc_port_.append(1, static_cast<char>(base::RandInt('A', 'Z')));
+ ipc_pipe.append(1, static_cast<char>(base::RandInt('A', 'Z')));
}
+ ipc_pipe_ = base::UTF8ToUTF16(ipc_pipe);
std::wstring command_line;
AppendCommandLineArgument(handler.value(), &command_line);
@@ -156,8 +157,7 @@ bool CrashpadClient::StartHandler(
base::UTF8ToUTF16(kv.first + '=' + kv.second)),
&command_line);
}
- AppendCommandLineArgument(FormatArgumentString("pipe-name",
- base::UTF8ToUTF16(ipc_port_)),
+ AppendCommandLineArgument(FormatArgumentString("pipe-name", ipc_pipe_),
&command_line);
STARTUPINFO startup_info = {};
@@ -191,17 +191,17 @@ bool CrashpadClient::StartHandler(
return true;
}
-bool CrashpadClient::SetHandler(const std::string& ipc_port) {
- DCHECK(ipc_port_.empty());
- DCHECK(!ipc_port.empty());
+bool CrashpadClient::SetHandlerIPCPipe(const std::wstring& ipc_pipe) {
+ DCHECK(ipc_pipe_.empty());
+ DCHECK(!ipc_pipe.empty());
- ipc_port_ = ipc_port;
+ ipc_pipe_ = ipc_pipe;
return true;
}
bool CrashpadClient::UseHandler() {
- DCHECK(!ipc_port_.empty());
+ DCHECK(!ipc_pipe_.empty());
DCHECK_EQ(g_signal_exception, INVALID_HANDLE_VALUE);
DCHECK_EQ(g_signal_non_crash_dump, INVALID_HANDLE_VALUE);
DCHECK_EQ(g_non_crash_dump_done, INVALID_HANDLE_VALUE);
@@ -232,8 +232,7 @@ bool CrashpadClient::UseHandler() {
ServerToClientMessage response = {0};
- if (!SendToCrashHandlerServer(
- base::UTF8ToUTF16(ipc_port_), message, &response)) {
+ if (!SendToCrashHandlerServer(ipc_pipe_, message, &response)) {
return false;
}
« no previous file with comments | « client/crashpad_client.h ('k') | handler/handler.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698