diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 00:40:17 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 00:40:17 +0000 |
commit | 30c918084bac874b6cfaabb93f0bb2545c5354e2 (patch) | |
tree | 45bd81ec93407433426c0a6d1421bc189a96c2c4 /chrome/browser/dom_ui | |
parent | d9cb161850584e5d277b141aadb68abec0af28bb (diff) | |
download | chromium_src-30c918084bac874b6cfaabb93f0bb2545c5354e2.zip chromium_src-30c918084bac874b6cfaabb93f0bb2545c5354e2.tar.gz chromium_src-30c918084bac874b6cfaabb93f0bb2545c5354e2.tar.bz2 |
Revert 69592 - file_version_info was not finding Mac values correctly.
Changed file_version_info to find Mac values, and changed version_info to fail if values can't be found.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/5815001
TBR=dmaclach@chromium.org
Review URL: http://codereview.chromium.org/6017003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/gpu_internals_ui.cc | 30 | ||||
-rw-r--r-- | chrome/browser/dom_ui/net_internals_ui.cc | 30 | ||||
-rw-r--r-- | chrome/browser/dom_ui/options/about_page_handler.cc | 1 |
3 files changed, 35 insertions, 26 deletions
diff --git a/chrome/browser/dom_ui/gpu_internals_ui.cc b/chrome/browser/dom_ui/gpu_internals_ui.cc index 9b2b58f..9b93bfb 100644 --- a/chrome/browser/dom_ui/gpu_internals_ui.cc +++ b/chrome/browser/dom_ui/gpu_internals_ui.cc @@ -206,19 +206,23 @@ Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { chrome::VersionInfo version_info; - // We have everything we need to send the right values. - dict->SetString("version", version_info.Version()); - dict->SetString("cl", version_info.LastChange()); - dict->SetString("version_mod", - platform_util::GetVersionStringModifier()); - dict->SetString("official", - l10n_util::GetStringUTF16( - version_info.IsOfficialBuild() ? - IDS_ABOUT_VERSION_OFFICIAL - : IDS_ABOUT_VERSION_UNOFFICIAL)); - - dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); + if (!version_info.is_valid()) { + DLOG(ERROR) << "Unable to create chrome::VersionInfo"; + } else { + // We have everything we need to send the right values. + dict->SetString("version", version_info.Version()); + dict->SetString("cl", version_info.LastChange()); + dict->SetString("version_mod", + platform_util::GetVersionStringModifier()); + dict->SetString("official", + l10n_util::GetStringUTF16( + version_info.IsOfficialBuild() ? + IDS_ABOUT_VERSION_OFFICIAL + : IDS_ABOUT_VERSION_UNOFFICIAL)); + + dict->SetString("command_line", + CommandLine::ForCurrentProcess()->command_line_string()); + } return dict; } diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc index 1f81022..f44ac9e 100644 --- a/chrome/browser/dom_ui/net_internals_ui.cc +++ b/chrome/browser/dom_ui/net_internals_ui.cc @@ -537,19 +537,23 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( chrome::VersionInfo version_info; - // We have everything we need to send the right values. - dict->SetString("version", version_info.Version()); - dict->SetString("cl", version_info.LastChange()); - dict->SetString("version_mod", - platform_util::GetVersionStringModifier()); - dict->SetString("official", - l10n_util::GetStringUTF16( - version_info.IsOfficialBuild() ? - IDS_ABOUT_VERSION_OFFICIAL - : IDS_ABOUT_VERSION_UNOFFICIAL)); - - dict->SetString("command_line", - CommandLine::ForCurrentProcess()->command_line_string()); + if (!version_info.is_valid()) { + DLOG(ERROR) << "Unable to create chrome::VersionInfo"; + } else { + // We have everything we need to send the right values. + dict->SetString("version", version_info.Version()); + dict->SetString("cl", version_info.LastChange()); + dict->SetString("version_mod", + platform_util::GetVersionStringModifier()); + dict->SetString("official", + l10n_util::GetStringUTF16( + version_info.IsOfficialBuild() ? + IDS_ABOUT_VERSION_OFFICIAL + : IDS_ABOUT_VERSION_UNOFFICIAL)); + + dict->SetString("command_line", + CommandLine::ForCurrentProcess()->command_line_string()); + } CallJavascriptFunction(L"g_browser.receivedClientInfo", dict); diff --git a/chrome/browser/dom_ui/options/about_page_handler.cc b/chrome/browser/dom_ui/options/about_page_handler.cc index 66420be..71f994f7 100644 --- a/chrome/browser/dom_ui/options/about_page_handler.cc +++ b/chrome/browser/dom_ui/options/about_page_handler.cc @@ -143,6 +143,7 @@ void AboutPageHandler::GetLocalizedValues(DictionaryValue* localized_strings) { // browser version chrome::VersionInfo version_info; + DCHECK(version_info.is_valid()); std::string browser_version = version_info.Version(); std::string version_modifier = platform_util::GetVersionStringModifier(); |