summaryrefslogtreecommitdiffstats
path: root/base/command_line.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 21:13:53 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 21:13:53 +0000
commita2318cda8a1092f127ed6b88b12fad8208608ad1 (patch)
tree2bb6ff41efd418e76c1898945584166d5d8962c7 /base/command_line.cc
parent779005e0450428d799f676fa4ed6ae3bcfd30f32 (diff)
downloadchromium_src-a2318cda8a1092f127ed6b88b12fad8208608ad1.zip
chromium_src-a2318cda8a1092f127ed6b88b12fad8208608ad1.tar.gz
chromium_src-a2318cda8a1092f127ed6b88b12fad8208608ad1.tar.bz2
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 <piman@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/command_line.cc')
-rw-r--r--base/command_line.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/command_line.cc b/base/command_line.cc
index d9a2052..e49254f 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -178,6 +178,12 @@ void CommandLine::Init(int argc, const char* const* argv) {
#endif
}
+void CommandLine::Terminate() {
+ DCHECK(current_process_commandline_ != NULL);
+ delete current_process_commandline_;
+ current_process_commandline_ = NULL;
+}
+
bool CommandLine::HasSwitch(const std::wstring& switch_string) const {
std::wstring lowercased_switch(switch_string);
#if defined(OS_WIN)
@@ -345,4 +351,3 @@ void CommandLine::PrependWrapper(const std::wstring& wrapper_wide) {
}
#endif
-