security/sandbox/win/src/sync_dispatcher.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/sandbox/win/src/sync_dispatcher.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     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_SYNC_DISPATCHER_H_
     1.9 +#define SANDBOX_SRC_SYNC_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 sync-related IPC calls.
    1.18 +class SyncDispatcher : public Dispatcher {
    1.19 + public:
    1.20 +  explicit SyncDispatcher(PolicyBase* policy_base);
    1.21 +  ~SyncDispatcher() {}
    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 CreateEvent in the target.
    1.28 +  bool CreateEvent(IPCInfo* ipc, std::wstring* name, DWORD manual_reset,
    1.29 +                   DWORD initial_state);
    1.30 +
    1.31 +  // Processes IPC requests coming from calls to OpenEvent in the target.
    1.32 +  bool OpenEvent(IPCInfo* ipc, std::wstring* name, DWORD desired_access,
    1.33 +                 DWORD inherit_handle);
    1.34 +
    1.35 +  PolicyBase* policy_base_;
    1.36 +  DISALLOW_COPY_AND_ASSIGN(SyncDispatcher);
    1.37 +};
    1.38 +
    1.39 +}  // namespace sandbox
    1.40 +
    1.41 +#endif  // SANDBOX_SRC_SYNC_DISPATCHER_H_

mercurial