Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 6894037: Add more information to about:version and "About Chromium" dialog (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Change the name of GetProfile() to profile() Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.h ('k') | chrome/common/chrome_version_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/about_chrome_view.cc
diff --git a/chrome/browser/ui/views/about_chrome_view.cc b/chrome/browser/ui/views/about_chrome_view.cc
index ae6dc400565c762c50e9e8f617ccd0f7b3b7fc35..3a4fe82f7658199ac87a3d5e0b25afa6fab80491 100644
--- a/chrome/browser/ui/views/about_chrome_view.cc
+++ b/chrome/browser/ui/views/about_chrome_view.cc
@@ -107,9 +107,7 @@ AboutChromeView::AboutChromeView(Profile* profile)
about_dlg_background_logo_(NULL),
about_title_label_(NULL),
version_label_(NULL),
-#if defined(OS_CHROMEOS)
os_version_label_(NULL),
-#endif
copyright_label_(NULL),
main_text_label_(NULL),
main_text_label_height_(0),
@@ -120,11 +118,7 @@ AboutChromeView::AboutChromeView(Profile* profile)
chromium_url_appears_first_(true),
text_direction_is_rtl_(false) {
DCHECK(profile);
-#if defined(OS_CHROMEOS)
- loader_.GetVersion(&consumer_,
- NewCallback(this, &AboutChromeView::OnOSVersion),
- chromeos::VersionLoader::VERSION_FULL);
-#endif
+
Init();
#if defined(OS_WIN) || defined(OS_CHROMEOS)
@@ -168,6 +162,10 @@ void AboutChromeView::Init() {
#if !defined(GOOGLE_CHROME_BUILD)
version_details_ += " (";
+ version_details_ += l10n_util::GetStringUTF8(
+ version_info.IsOfficialBuild() ?
+ IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL);
+ version_details_ += " ";
version_details_ += version_info.LastChange();
version_details_ += ")";
#endif
@@ -223,8 +221,14 @@ void AboutChromeView::Init() {
ResourceBundle::BaseFont));
AddChildView(version_label_);
-#if defined(OS_CHROMEOS)
os_version_label_ = new views::Textfield(views::Textfield::STYLE_MULTILINE);
+#if defined(OS_CHROMEOS)
+ loader_.GetVersion(&consumer_,
+ NewCallback(this, &AboutChromeView::OnOSVersion),
+ chromeos::VersionLoader::VERSION_FULL);
+#else
+ os_version_label_->SetText(UTF8ToUTF16(version_info.OSType()));
+#endif
os_version_label_->SetReadOnly(true);
os_version_label_->RemoveBorder();
os_version_label_->SetTextColor(SK_ColorBLACK);
@@ -232,7 +236,6 @@ void AboutChromeView::Init() {
os_version_label_->SetFont(ResourceBundle::GetSharedInstance().GetFont(
ResourceBundle::BaseFont));
AddChildView(os_version_label_);
-#endif
// The copyright URL portion of the main label.
copyright_label_ = new views::Label(
@@ -361,7 +364,6 @@ void AboutChromeView::Layout() {
kVersionFieldWidth,
sz.height());
-#if defined(OS_CHROMEOS)
// Then we have the version number right below it.
sz = os_version_label_->GetPreferredSize();
os_version_label_->SetBounds(
@@ -371,7 +373,6 @@ void AboutChromeView::Layout() {
views::kRelatedControlVerticalSpacing,
kVersionFieldWidth,
sz.height());
-#endif
// For the width of the main text label we want to use up the whole panel
// width and remaining height, minus a little margin on each side.
« no previous file with comments | « chrome/browser/ui/views/about_chrome_view.h ('k') | chrome/common/chrome_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698