| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/about_chrome_view.h" | 5 #include "chrome/browser/ui/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 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/i18n/rtl.h" | 16 #include "base/i18n/rtl.h" |
| 17 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
| 18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 19 #include "base/win/windows_version.h" | 19 #include "base/win/windows_version.h" |
| 20 #include "chrome/browser/google/google_util.h" | 20 #include "chrome/browser/google/google_util.h" |
| 21 #include "chrome/browser/platform_util.h" | |
| 22 #include "chrome/browser/prefs/pref_service.h" | 21 #include "chrome/browser/prefs/pref_service.h" |
| 23 #include "chrome/browser/ui/browser_list.h" | 22 #include "chrome/browser/ui/browser_list.h" |
| 24 #include "chrome/browser/ui/views/window.h" | 23 #include "chrome/browser/ui/views/window.h" |
| 25 #include "chrome/common/chrome_constants.h" | 24 #include "chrome/common/chrome_constants.h" |
| 26 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
| 27 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 28 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 29 #include "chrome/installer/util/browser_distribution.h" | 28 #include "chrome/installer/util/browser_distribution.h" |
| 30 #include "content/browser/user_metrics.h" | 29 #include "content/browser/user_metrics.h" |
| 31 #include "grit/chromium_strings.h" | 30 #include "grit/chromium_strings.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 if (!version_info.is_valid()) { | 142 if (!version_info.is_valid()) { |
| 144 NOTREACHED() << L"Failed to initialize about window"; | 143 NOTREACHED() << L"Failed to initialize about window"; |
| 145 return; | 144 return; |
| 146 } | 145 } |
| 147 | 146 |
| 148 current_version_ = version_info.Version(); | 147 current_version_ = version_info.Version(); |
| 149 | 148 |
| 150 // This code only runs as a result of the user opening the About box so | 149 // This code only runs as a result of the user opening the About box so |
| 151 // doing registry access to get the version string modifier should be fine. | 150 // doing registry access to get the version string modifier should be fine. |
| 152 base::ThreadRestrictions::ScopedAllowIO allow_io; | 151 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 153 std::string version_modifier = platform_util::GetVersionStringModifier(); | 152 std::string version_modifier = |
| 153 chrome::VersionInfo::GetVersionStringModifier(); |
| 154 if (!version_modifier.empty()) | 154 if (!version_modifier.empty()) |
| 155 version_details_ += " " + version_modifier; | 155 version_details_ += " " + version_modifier; |
| 156 | 156 |
| 157 #if !defined(GOOGLE_CHROME_BUILD) | 157 #if !defined(GOOGLE_CHROME_BUILD) |
| 158 version_details_ += " ("; | 158 version_details_ += " ("; |
| 159 version_details_ += l10n_util::GetStringUTF8( | 159 version_details_ += l10n_util::GetStringUTF8( |
| 160 version_info.IsOfficialBuild() ? | 160 version_info.IsOfficialBuild() ? |
| 161 IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL); | 161 IDS_ABOUT_VERSION_OFFICIAL : IDS_ABOUT_VERSION_UNOFFICIAL); |
| 162 version_details_ += " "; | 162 version_details_ += " "; |
| 163 version_details_ += version_info.LastChange(); | 163 version_details_ += version_info.LastChange(); |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 // We have updated controls on the parent, so we need to update its layout. | 780 // We have updated controls on the parent, so we need to update its layout. |
| 781 parent()->Layout(); | 781 parent()->Layout(); |
| 782 | 782 |
| 783 // Check button may have appeared/disappeared. We cannot call this during | 783 // Check button may have appeared/disappeared. We cannot call this during |
| 784 // ViewHierarchyChanged because the view hasn't been added to a Widget yet. | 784 // ViewHierarchyChanged because the view hasn't been added to a Widget yet. |
| 785 if (GetWidget()) | 785 if (GetWidget()) |
| 786 GetDialogClientView()->UpdateDialogButtons(); | 786 GetDialogClientView()->UpdateDialogButtons(); |
| 787 } | 787 } |
| 788 | 788 |
| 789 #endif | 789 #endif |
| OLD | NEW |