1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/sandbox/win/src/named_pipe_dispatcher.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 1.4 +// Copyright (c) 2010 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +#ifndef SANDBOX_SRC_NAMED_PIPE_DISPATCHER_H__ 1.9 +#define SANDBOX_SRC_NAMED_PIPE_DISPATCHER_H__ 1.10 + 1.11 +#include "base/basictypes.h" 1.12 +#include "sandbox/win/src/crosscall_server.h" 1.13 +#include "sandbox/win/src/sandbox_policy_base.h" 1.14 + 1.15 +namespace sandbox { 1.16 + 1.17 +// This class handles named pipe related IPC calls. 1.18 +class NamedPipeDispatcher : public Dispatcher { 1.19 + public: 1.20 + explicit NamedPipeDispatcher(PolicyBase* policy_base); 1.21 + ~NamedPipeDispatcher() {} 1.22 + 1.23 + // Dispatcher interface. 1.24 + virtual bool SetupService(InterceptionManager* manager, int service); 1.25 + 1.26 + private: 1.27 + // Processes IPC requests coming from calls to CreateNamedPipeW() in the 1.28 + // target. 1.29 + bool CreateNamedPipe(IPCInfo* ipc, std::wstring* name, DWORD open_mode, 1.30 + DWORD pipe_mode, DWORD max_instances, 1.31 + DWORD out_buffer_size, DWORD in_buffer_size, 1.32 + DWORD default_timeout); 1.33 + 1.34 + PolicyBase* policy_base_; 1.35 + DISALLOW_COPY_AND_ASSIGN(NamedPipeDispatcher); 1.36 +}; 1.37 + 1.38 +} // namespace sandbox 1.39 + 1.40 +#endif // SANDBOX_SRC_NAMED_PIPE_DISPATCHER_H__