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

Unified Diff: remoting/host/ipc_util_win.cc

Issue 2581853002: Removing ipc_util files and references (Closed)
Patch Set: Created 4 years 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 | « remoting/host/ipc_util.h ('k') | remoting/host/security_key/security_key_auth_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/ipc_util_win.cc
diff --git a/remoting/host/ipc_util_win.cc b/remoting/host/ipc_util_win.cc
deleted file mode 100644
index a70b528fdeea7448aa9ad0eaf27f1b34db7593fa..0000000000000000000000000000000000000000
--- a/remoting/host/ipc_util_win.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "remoting/host/ipc_util.h"
-
-#include <utility>
-
-#include "base/logging.h"
-#include "base/strings/utf_string_conversions.h"
-#include "base/win/scoped_handle.h"
-#include "base/win/win_util.h"
-#include "ipc/ipc_channel.h"
-#include "remoting/host/win/security_descriptor.h"
-
-namespace remoting {
-
-// Pipe name prefix used by Chrome IPC channels to convert a channel name into
-// a pipe name.
-const char kChromePipeNamePrefix[] = "\\\\.\\pipe\\chrome.";
-
-bool CreateIpcChannel(
- const std::string& channel_name,
- const std::string& pipe_security_descriptor,
- base::win::ScopedHandle* pipe_out) {
- // Create security descriptor for the channel.
- ScopedSd sd = ConvertSddlToSd(pipe_security_descriptor);
- if (!sd) {
- PLOG(ERROR) << "Failed to create a security descriptor for the Chromoting "
- "IPC channel";
- return false;
- }
-
- SECURITY_ATTRIBUTES security_attributes = {0};
- security_attributes.nLength = sizeof(security_attributes);
- security_attributes.lpSecurityDescriptor = sd.get();
- security_attributes.bInheritHandle = FALSE;
-
- // Convert the channel name to the pipe name.
- std::string pipe_name(kChromePipeNamePrefix);
- pipe_name.append(channel_name);
-
- // Create the server end of the pipe. This code should match the code in
- // IPC::Channel with exception of passing a non-default security descriptor.
- base::win::ScopedHandle pipe;
- pipe.Set(CreateNamedPipe(
- base::UTF8ToUTF16(pipe_name).c_str(),
- PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE,
- PIPE_TYPE_BYTE | PIPE_READMODE_BYTE,
- 1,
- IPC::Channel::kReadBufferSize,
- IPC::Channel::kReadBufferSize,
- 5000,
- &security_attributes));
- if (!pipe.IsValid()) {
- PLOG(ERROR)
- << "Failed to create the server end of the Chromoting IPC channel";
- return false;
- }
-
- *pipe_out = std::move(pipe);
- return true;
-}
-
-} // namespace remoting
« no previous file with comments | « remoting/host/ipc_util.h ('k') | remoting/host/security_key/security_key_auth_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698