summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_about_handler.cc
diff options
context:
space:
mode:
authorpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-12 20:44:46 +0000
committerpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-12 20:44:46 +0000
commit21a99ca2af8e66e3d8f8f93788aab966515bf62d (patch)
tree81ea86d08d7d01b7cca5933f380816124edb46b9 /chrome/browser/browser_about_handler.cc
parenta67fa08ebbe6ccdcf58e654a1609c38fdae65e60 (diff)
downloadchromium_src-21a99ca2af8e66e3d8f8f93788aab966515bf62d.zip
chromium_src-21a99ca2af8e66e3d8f8f93788aab966515bf62d.tar.gz
chromium_src-21a99ca2af8e66e3d8f8f93788aab966515bf62d.tar.bz2
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
Diffstat (limited to 'chrome/browser/browser_about_handler.cc')
-rw-r--r--chrome/browser/browser_about_handler.cc16
1 files changed, 16 insertions, 0 deletions
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<std::string> 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(