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

Unified Diff: remoting/host/ipc_util_win.cc

Issue 307463004: Remove PlatformFile from remoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation Created 6 years, 7 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 | « remoting/host/ipc_util_posix.cc ('k') | remoting/host/native_messaging/native_messaging_reader_unittest.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
index 37c3383087e1573b92a8eb4a4a44e0cd30fb1d45..dabdbe119e666382427eb454387873498044dfab 100644
--- a/remoting/host/ipc_util_win.cc
+++ b/remoting/host/ipc_util_win.cc
@@ -4,6 +4,7 @@
#include "remoting/host/ipc_util.h"
+#include "base/files/file.h"
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/stringprintf.h"
@@ -25,7 +26,7 @@ const char kChromePipeNamePrefix[] = "\\\\.\\pipe\\chrome.";
bool CreateConnectedIpcChannel(
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
IPC::Listener* listener,
- IPC::PlatformFileForTransit* client_out,
+ base::File* client_out,
scoped_ptr<IPC::ChannelProxy>* server_out) {
// presubmit: allow wstring
std::wstring user_sid;
@@ -68,21 +69,20 @@ bool CreateConnectedIpcChannel(
// Create the client end of the channel. This code should match the code in
// IPC::Channel.
- ScopedHandle client;
- client.Set(CreateFile(base::UTF8ToUTF16(pipe_name).c_str(),
- GENERIC_READ | GENERIC_WRITE,
- 0,
- &security_attributes,
- OPEN_EXISTING,
- SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION |
- FILE_FLAG_OVERLAPPED,
- NULL));
+ base::File client(CreateFile(base::UTF8ToUTF16(pipe_name).c_str(),
+ GENERIC_READ | GENERIC_WRITE,
+ 0,
+ &security_attributes,
+ OPEN_EXISTING,
+ SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION |
+ FILE_FLAG_OVERLAPPED,
+ NULL));
if (!client.IsValid()) {
PLOG(ERROR) << "Failed to connect to '" << pipe_name << "'";
return false;
}
- *client_out = client.Take();
+ *client_out = client.Pass();
*server_out = server.Pass();
return true;
}
« no previous file with comments | « remoting/host/ipc_util_posix.cc ('k') | remoting/host/native_messaging/native_messaging_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698