OLD | NEW |
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 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/i18n/rtl.h" | 14 #include "base/i18n/rtl.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 17 #include "base/win/windows_version.h" |
17 #include "chrome/browser/browser_list.h" | 18 #include "chrome/browser/browser_list.h" |
18 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/metrics/user_metrics.h" | 20 #include "chrome/browser/metrics/user_metrics.h" |
20 #include "chrome/browser/platform_util.h" | 21 #include "chrome/browser/platform_util.h" |
21 #include "chrome/browser/prefs/pref_service.h" | 22 #include "chrome/browser/prefs/pref_service.h" |
22 #include "chrome/browser/views/accessible_view_helper.h" | 23 #include "chrome/browser/views/accessible_view_helper.h" |
23 #include "chrome/browser/views/window.h" | 24 #include "chrome/browser/views/window.h" |
24 #include "chrome/common/chrome_constants.h" | 25 #include "chrome/common/chrome_constants.h" |
25 #include "chrome/common/chrome_version_info.h" | 26 #include "chrome/common/chrome_version_info.h" |
26 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 parent->AddChildView(&timeout_indicator_); | 518 parent->AddChildView(&timeout_indicator_); |
518 timeout_indicator_.SetVisible(false); | 519 timeout_indicator_.SetVisible(false); |
519 | 520 |
520 #if defined(OS_WIN) | 521 #if defined(OS_WIN) |
521 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned | 522 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned |
522 // off. So, in this case we just want the About box to not mention | 523 // off. So, in this case we just want the About box to not mention |
523 // on-demand updates. Silent updates (in the background) should still | 524 // on-demand updates. Silent updates (in the background) should still |
524 // work as before - enabling UAC or installing the latest service pack | 525 // work as before - enabling UAC or installing the latest service pack |
525 // for Vista is another option. | 526 // for Vista is another option. |
526 int service_pack_major = 0, service_pack_minor = 0; | 527 int service_pack_major = 0, service_pack_minor = 0; |
527 win_util::GetServicePackLevel(&service_pack_major, &service_pack_minor); | 528 base::win::GetServicePackLevel(&service_pack_major, &service_pack_minor); |
528 if (win_util::UserAccountControlIsEnabled() || | 529 if (win_util::UserAccountControlIsEnabled() || |
529 win_util::GetWinVersion() == win_util::WINVERSION_XP || | 530 base::win::GetVersion() == base::win::VERSION_XP || |
530 (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && | 531 (base::win::GetVersion() == base::win::VERSION_VISTA && |
531 service_pack_major >= 1) || | 532 service_pack_major >= 1) || |
532 win_util::GetWinVersion() > win_util::WINVERSION_VISTA) { | 533 base::win::GetVersion() > base::win::VERSION_VISTA) { |
533 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 534 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
534 // CheckForUpdate(false, ...) means don't upgrade yet. | 535 // CheckForUpdate(false, ...) means don't upgrade yet. |
535 google_updater_->CheckForUpdate(false, window()); | 536 google_updater_->CheckForUpdate(false, window()); |
536 } | 537 } |
537 #elif defined(OS_CHROMEOS) | 538 #elif defined(OS_CHROMEOS) |
538 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 539 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
539 // CheckForUpdate(false, ...) means don't upgrade yet. | 540 // CheckForUpdate(false, ...) means don't upgrade yet. |
540 google_updater_->CheckForUpdate(false, window()); | 541 google_updater_->CheckForUpdate(false, window()); |
541 #endif | 542 #endif |
542 } else { | 543 } else { |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 View* parent = GetParent(); | 810 View* parent = GetParent(); |
810 parent->Layout(); | 811 parent->Layout(); |
811 | 812 |
812 // Check button may have appeared/disappeared. We cannot call this during | 813 // Check button may have appeared/disappeared. We cannot call this during |
813 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 814 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
814 if (window()) | 815 if (window()) |
815 GetDialogClientView()->UpdateDialogButtons(); | 816 GetDialogClientView()->UpdateDialogButtons(); |
816 } | 817 } |
817 | 818 |
818 #endif | 819 #endif |
OLD | NEW |