From a2318cda8a1092f127ed6b88b12fad8208608ad1 Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Wed, 25 Feb 2009 21:13:53 +0000 Subject: Add CommandLine::Terminate to be able to re-initialize the process command line singleton. Review URL: http://codereview.chromium.org/28060 Patch from Antoine Labour . git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10379 0039d316-1c4b-4281-b951-d872f2087c98 --- base/command_line.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'base/command_line.h') diff --git a/base/command_line.h b/base/command_line.h index 94992b8..c79268d7 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -52,6 +52,13 @@ class CommandLine { // line, but it still must be called to set up the command line. static void Init(int argc, const char* const* argv); + // Destroys the current process CommandLine singleton. This is necessary if + // you want to reset the base library to its initial state (for example in an + // outer library that needs to be able to terminate, and be re-initialized). + // If Init is called only once, e.g. in main(), calling Terminate() is not + // necessary. + static void Terminate(); + // Get the singleton CommandLine representing the current process's // command line. static const CommandLine* ForCurrentProcess() { -- cgit v1.1