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 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 update_available_indicator_.SetVisible(false); | 525 update_available_indicator_.SetVisible(false); |
526 parent->AddChildView(&timeout_indicator_); | 526 parent->AddChildView(&timeout_indicator_); |
527 timeout_indicator_.SetVisible(false); | 527 timeout_indicator_.SetVisible(false); |
528 | 528 |
529 #if defined(OS_WIN) | 529 #if defined(OS_WIN) |
530 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned | 530 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned |
531 // off. So, in this case we just want the About box to not mention | 531 // off. So, in this case we just want the About box to not mention |
532 // on-demand updates. Silent updates (in the background) should still | 532 // on-demand updates. Silent updates (in the background) should still |
533 // work as before - enabling UAC or installing the latest service pack | 533 // work as before - enabling UAC or installing the latest service pack |
534 // for Vista is another option. | 534 // for Vista is another option. |
| 535 int service_pack_major = 0, service_pack_minor = 0; |
| 536 base::win::GetServicePackLevel(&service_pack_major, &service_pack_minor); |
535 if (!(base::win::GetVersion() == base::win::VERSION_VISTA && | 537 if (!(base::win::GetVersion() == base::win::VERSION_VISTA && |
536 (base::win::OSInfo::GetInstance()->service_pack().major == 0) && | 538 (service_pack_major == 0) && |
537 !base::win::UserAccountControlIsEnabled())) { | 539 !base::win::UserAccountControlIsEnabled())) { |
538 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 540 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
539 // CheckForUpdate(false, ...) means don't upgrade yet. | 541 // CheckForUpdate(false, ...) means don't upgrade yet. |
540 google_updater_->CheckForUpdate(false, window()); | 542 google_updater_->CheckForUpdate(false, window()); |
541 } | 543 } |
542 #elif defined(OS_CHROMEOS) | 544 #elif defined(OS_CHROMEOS) |
543 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 545 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
544 // CheckForUpdate(false, ...) means don't upgrade yet. | 546 // CheckForUpdate(false, ...) means don't upgrade yet. |
545 google_updater_->CheckForUpdate(false, window()); | 547 google_updater_->CheckForUpdate(false, window()); |
546 #endif | 548 #endif |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 // We have updated controls on the parent, so we need to update its layout. | 831 // We have updated controls on the parent, so we need to update its layout. |
830 parent()->Layout(); | 832 parent()->Layout(); |
831 | 833 |
832 // Check button may have appeared/disappeared. We cannot call this during | 834 // Check button may have appeared/disappeared. We cannot call this during |
833 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 835 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
834 if (window()) | 836 if (window()) |
835 GetDialogClientView()->UpdateDialogButtons(); | 837 GetDialogClientView()->UpdateDialogButtons(); |
836 } | 838 } |
837 | 839 |
838 #endif | 840 #endif |
OLD | NEW |