From 21a99ca2af8e66e3d8f8f93788aab966515bf62d Mon Sep 17 00:00:00 2001 From: "pam@chromium.org" Date: Fri, 12 Feb 2010 20:44:46 +0000 Subject: Add command line to about:version. BUG=18577 TEST=open about:version, see full command line (executable and switches) Review URL: http://codereview.chromium.org/603017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38935 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_about_handler.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'chrome/browser/browser_about_handler.cc') diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 9b1e706..e00a5774 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -527,7 +527,23 @@ std::string AboutVersion(DictionaryValue* localized_strings) { localized_strings->SetString(L"official", l10n_util::GetString(IDS_ABOUT_VERSION_UNOFFICIAL)); } + localized_strings->SetString(L"user_agent_name", + l10n_util::GetString(IDS_ABOUT_VERSION_USER_AGENT)); localized_strings->SetString(L"useragent", webkit_glue::GetUserAgent(GURL())); + localized_strings->SetString(L"command_line_name", + l10n_util::GetString(IDS_ABOUT_VERSION_COMMAND_LINE)); + +#if defined(OS_WIN) + localized_strings->SetString(L"command_line", + CommandLine::ForCurrentProcess()->command_line_string()); +#elif defined(OS_POSIX) + std::string command_line = ""; + typedef std::vector ArgvList; + const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); + for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) + command_line += " " + *iter; + localized_strings->SetString(L"command_line", command_line); +#endif static const std::string version_html( ResourceBundle::GetSharedInstance().GetDataResource( -- cgit v1.1