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); | |
537 if (!(base::win::GetVersion() == base::win::VERSION_VISTA && | 535 if (!(base::win::GetVersion() == base::win::VERSION_VISTA && |
538 (service_pack_major == 0) && | 536 (base::win::OSInfo::GetInstance()->service_pack()[0] == 0) && |
539 !base::win::UserAccountControlIsEnabled())) { | 537 !base::win::UserAccountControlIsEnabled())) { |
540 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 538 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
541 // CheckForUpdate(false, ...) means don't upgrade yet. | 539 // CheckForUpdate(false, ...) means don't upgrade yet. |
542 google_updater_->CheckForUpdate(false, window()); | 540 google_updater_->CheckForUpdate(false, window()); |
543 } | 541 } |
544 #elif defined(OS_CHROMEOS) | 542 #elif defined(OS_CHROMEOS) |
545 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 543 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
546 // CheckForUpdate(false, ...) means don't upgrade yet. | 544 // CheckForUpdate(false, ...) means don't upgrade yet. |
547 google_updater_->CheckForUpdate(false, window()); | 545 google_updater_->CheckForUpdate(false, window()); |
548 #endif | 546 #endif |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // We have updated controls on the parent, so we need to update its layout. | 829 // We have updated controls on the parent, so we need to update its layout. |
832 parent()->Layout(); | 830 parent()->Layout(); |
833 | 831 |
834 // Check button may have appeared/disappeared. We cannot call this during | 832 // Check button may have appeared/disappeared. We cannot call this during |
835 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 833 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
836 if (window()) | 834 if (window()) |
837 GetDialogClientView()->UpdateDialogButtons(); | 835 GetDialogClientView()->UpdateDialogButtons(); |
838 } | 836 } |
839 | 837 |
840 #endif | 838 #endif |
OLD | NEW |