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

Side by Side Diff: remoting/host/setup/test_util.cc

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « remoting/host/setup/start_host.cc ('k') | remoting/host/setup/win/auth_code_getter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/setup/test_util.h" 5 #include "remoting/host/setup/test_util.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
11 #endif 11 #endif
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 bool MakePipe(base::File* read_file, 15 bool MakePipe(base::File* read_file,
16 base::File* write_file) { 16 base::File* write_file) {
17 #if defined(OS_WIN) 17 #if defined(OS_WIN)
18 base::PlatformFile read_handle; 18 base::PlatformFile read_handle;
19 base::PlatformFile write_handle; 19 base::PlatformFile write_handle;
20 if (!CreatePipe(&read_handle, &write_handle, NULL, 0)) 20 if (!CreatePipe(&read_handle, &write_handle, nullptr, 0))
21 return false; 21 return false;
22 *read_file = base::File(read_handle); 22 *read_file = base::File(read_handle);
23 *write_file = base::File(write_handle); 23 *write_file = base::File(write_handle);
24 return true; 24 return true;
25 #elif defined(OS_POSIX) 25 #elif defined(OS_POSIX)
26 int fds[2]; 26 int fds[2];
27 if (pipe(fds) == 0) { 27 if (pipe(fds) == 0) {
28 *read_file = base::File(fds[0]); 28 *read_file = base::File(fds[0]);
29 *write_file = base::File(fds[1]); 29 *write_file = base::File(fds[1]);
30 return true; 30 return true;
31 } 31 }
32 return false; 32 return false;
33 #else 33 #else
34 #error Not implemented 34 #error Not implemented
35 #endif 35 #endif
36 } 36 }
37 37
38 } // namepsace remoting 38 } // namepsace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/start_host.cc ('k') | remoting/host/setup/win/auth_code_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698