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

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

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