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

Side by Side Diff: sandbox/win/src/named_pipe_dispatcher.cc

Issue 1538283002: Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: macros Created 4 years, 12 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 | « sandbox/win/src/named_pipe_dispatcher.h ('k') | sandbox/win/src/named_pipe_policy.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "sandbox/win/src/named_pipe_dispatcher.h" 5 #include "sandbox/win/src/named_pipe_dispatcher.h"
6 6
7 #include "base/basictypes.h" 7 #include <stdint.h>
8
8 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
9 10
10 #include "sandbox/win/src/crosscall_client.h" 11 #include "sandbox/win/src/crosscall_client.h"
11 #include "sandbox/win/src/interception.h" 12 #include "sandbox/win/src/interception.h"
12 #include "sandbox/win/src/interceptors.h" 13 #include "sandbox/win/src/interceptors.h"
13 #include "sandbox/win/src/ipc_tags.h" 14 #include "sandbox/win/src/ipc_tags.h"
14 #include "sandbox/win/src/named_pipe_interception.h" 15 #include "sandbox/win/src/named_pipe_interception.h"
15 #include "sandbox/win/src/named_pipe_policy.h" 16 #include "sandbox/win/src/named_pipe_policy.h"
16 #include "sandbox/win/src/policy_broker.h" 17 #include "sandbox/win/src/policy_broker.h"
17 #include "sandbox/win/src/policy_params.h" 18 #include "sandbox/win/src/policy_params.h"
(...skipping 22 matching lines...) Expand all
40 int service) { 41 int service) {
41 if (IPC_CREATENAMEDPIPEW_TAG == service) 42 if (IPC_CREATENAMEDPIPEW_TAG == service)
42 return INTERCEPT_EAT(manager, kKerneldllName, CreateNamedPipeW, 43 return INTERCEPT_EAT(manager, kKerneldllName, CreateNamedPipeW,
43 CREATE_NAMED_PIPE_ID, 36); 44 CREATE_NAMED_PIPE_ID, 36);
44 45
45 return false; 46 return false;
46 } 47 }
47 48
48 bool NamedPipeDispatcher::CreateNamedPipe(IPCInfo* ipc, 49 bool NamedPipeDispatcher::CreateNamedPipe(IPCInfo* ipc,
49 base::string16* name, 50 base::string16* name,
50 uint32 open_mode, 51 uint32_t open_mode,
51 uint32 pipe_mode, 52 uint32_t pipe_mode,
52 uint32 max_instances, 53 uint32_t max_instances,
53 uint32 out_buffer_size, 54 uint32_t out_buffer_size,
54 uint32 in_buffer_size, 55 uint32_t in_buffer_size,
55 uint32 default_timeout) { 56 uint32_t default_timeout) {
56 ipc->return_info.win32_result = ERROR_ACCESS_DENIED; 57 ipc->return_info.win32_result = ERROR_ACCESS_DENIED;
57 ipc->return_info.handle = INVALID_HANDLE_VALUE; 58 ipc->return_info.handle = INVALID_HANDLE_VALUE;
58 59
59 base::StringPiece16 dotdot(L".."); 60 base::StringPiece16 dotdot(L"..");
60 61
61 for (const base::StringPiece16& path : base::SplitStringPiece( 62 for (const base::StringPiece16& path : base::SplitStringPiece(
62 *name, base::string16(1, '/'), 63 *name, base::string16(1, '/'),
63 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) { 64 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
64 for (const base::StringPiece16& inner : base::SplitStringPiece( 65 for (const base::StringPiece16& inner : base::SplitStringPiece(
65 path, base::string16(1, '\\'), 66 path, base::string16(1, '\\'),
(...skipping 27 matching lines...) Expand all
93 out_buffer_size, 94 out_buffer_size,
94 in_buffer_size, 95 in_buffer_size,
95 default_timeout, &pipe); 96 default_timeout, &pipe);
96 97
97 ipc->return_info.win32_result = ret; 98 ipc->return_info.win32_result = ret;
98 ipc->return_info.handle = pipe; 99 ipc->return_info.handle = pipe;
99 return true; 100 return true;
100 } 101 }
101 102
102 } // namespace sandbox 103 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/named_pipe_dispatcher.h ('k') | sandbox/win/src/named_pipe_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698