From a1a130f7da9191abecf15b3c27e2aa7ee1faacb3 Mon Sep 17 00:00:00 2001 From: "pinkerton@google.com" Date: Fri, 9 Jan 2009 20:28:44 +0000 Subject: remove chrome dependencies from win sandboxing headers. Wrap sandbox code to make the main routine a little cleaner. Unify the parameters of each of the "main" entry points so we can more easily abstract platform differences in the future. BUG=5323 Review URL: http://codereview.chromium.org/17426 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7825 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/main_function_params.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 chrome/common/main_function_params.h (limited to 'chrome/common/main_function_params.h') diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h new file mode 100644 index 0000000..b8156ae --- /dev/null +++ b/chrome/common/main_function_params.h @@ -0,0 +1,24 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Wrapper to the parameter list for the "main" entry points (browser, renderer, +// plugin) to shield the call sites from the differences between platforms +// (e.g., POSIX doesn't need to pass any sandbox information). + +#ifndef CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_ +#define CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_ + +#include "base/command_line.h" +#include "chrome/common/sandbox_init_wrapper.h" + +// TODO(pinkerton): |cl| should be const, but can't be due to bug 6144. + +struct MainFunctionParams { + MainFunctionParams(CommandLine& cl, const SandboxInitWrapper& sb) + : command_line_(cl), sandbox_info_(sb) { } + CommandLine& command_line_; + const SandboxInitWrapper& sandbox_info_; +}; + +#endif // CHROME_COMMON_MAIN_FUNCTINON_PARAMS_H_ -- cgit v1.1