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

Side by Side Diff: chrome/browser/ui/views/about_chrome_view.cc

Issue 6076008: Fix regression in upgrade detection in about dialog.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/about_chrome_view.h" 5 #include "chrome/browser/views/about_chrome_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 #if defined(OS_WIN) 748 #if defined(OS_WIN)
749 // Google Update reported that Chrome is up-to-date. Now make sure that we 749 // Google Update reported that Chrome is up-to-date. Now make sure that we
750 // are running the latest version and if not, notify the user by falling 750 // are running the latest version and if not, notify the user by falling
751 // into the next case of UPGRADE_SUCCESSFUL. 751 // into the next case of UPGRADE_SUCCESSFUL.
752 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 752 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
753 scoped_ptr<Version> installed_version( 753 scoped_ptr<Version> installed_version(
754 InstallUtil::GetChromeVersion(dist, false)); 754 InstallUtil::GetChromeVersion(dist, false));
755 scoped_ptr<Version> running_version( 755 scoped_ptr<Version> running_version(
756 Version::GetVersionFromString(current_version_)); 756 Version::GetVersionFromString(current_version_));
757 if (!installed_version.get() || 757 if (!installed_version.get() ||
758 (installed_version->CompareTo(*running_version) < 0)) { 758 (installed_version->CompareTo(*running_version) <= 0)) {
759 #endif 759 #endif
760 UserMetrics::RecordAction( 760 UserMetrics::RecordAction(
761 UserMetricsAction("UpgradeCheck_AlreadyUpToDate"), profile_); 761 UserMetricsAction("UpgradeCheck_AlreadyUpToDate"), profile_);
762 #if defined(OS_CHROMEOS) 762 #if defined(OS_CHROMEOS)
763 std::wstring update_label_text = 763 std::wstring update_label_text =
764 l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE, 764 l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE,
765 l10n_util::GetString(IDS_PRODUCT_NAME)); 765 l10n_util::GetString(IDS_PRODUCT_NAME));
766 #else 766 #else
767 std::wstring update_label_text = 767 std::wstring update_label_text =
768 l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE, 768 l10n_util::GetStringF(IDS_UPGRADE_ALREADY_UP_TO_DATE,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 View* parent = GetParent(); 822 View* parent = GetParent();
823 parent->Layout(); 823 parent->Layout();
824 824
825 // Check button may have appeared/disappeared. We cannot call this during 825 // Check button may have appeared/disappeared. We cannot call this during
826 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. 826 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet.
827 if (window()) 827 if (window())
828 GetDialogClientView()->UpdateDialogButtons(); 828 GetDialogClientView()->UpdateDialogButtons();
829 } 829 }
830 830
831 #endif 831 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698