| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <commdlg.h> | 7 #include <commdlg.h> |
| 8 | 8 |
| 9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned | 577 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned |
| 578 // off. So, in this case we just want the About box to not mention | 578 // off. So, in this case we just want the About box to not mention |
| 579 // on-demand updates. Silent updates (in the background) should still | 579 // on-demand updates. Silent updates (in the background) should still |
| 580 // work as before - enabling UAC or installing the latest service pack | 580 // work as before - enabling UAC or installing the latest service pack |
| 581 // for Vista is another option. | 581 // for Vista is another option. |
| 582 int service_pack_major = 0, service_pack_minor = 0; | 582 int service_pack_major = 0, service_pack_minor = 0; |
| 583 win_util::GetServicePackLevel(&service_pack_major, &service_pack_minor); | 583 win_util::GetServicePackLevel(&service_pack_major, &service_pack_minor); |
| 584 if (win_util::UserAccountControlIsEnabled() || | 584 if (win_util::UserAccountControlIsEnabled() || |
| 585 win_util::GetWinVersion() == win_util::WINVERSION_XP || | 585 win_util::GetWinVersion() == win_util::WINVERSION_XP || |
| 586 (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && | 586 (win_util::GetWinVersion() == win_util::WINVERSION_VISTA && |
| 587 service_pack_major >= 1)) { | 587 service_pack_major >= 1) || |
| 588 win_util::GetWinVersion() > win_util::WINVERSION_VISTA) { |
| 588 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); | 589 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR); |
| 589 google_updater_->CheckForUpdate(false); // false=don't upgrade yet. | 590 google_updater_->CheckForUpdate(false); // false=don't upgrade yet. |
| 590 } | 591 } |
| 591 } else { | 592 } else { |
| 592 parent->RemoveChildView(&update_label_); | 593 parent->RemoveChildView(&update_label_); |
| 593 parent->RemoveChildView(throbber_.get()); | 594 parent->RemoveChildView(throbber_.get()); |
| 594 parent->RemoveChildView(&success_indicator_); | 595 parent->RemoveChildView(&success_indicator_); |
| 595 parent->RemoveChildView(&update_available_indicator_); | 596 parent->RemoveChildView(&update_available_indicator_); |
| 596 parent->RemoveChildView(&timeout_indicator_); | 597 parent->RemoveChildView(&timeout_indicator_); |
| 597 } | 598 } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 | 810 |
| 810 // We have updated controls on the parent, so we need to update its layout. | 811 // We have updated controls on the parent, so we need to update its layout. |
| 811 View* parent = GetParent(); | 812 View* parent = GetParent(); |
| 812 parent->Layout(); | 813 parent->Layout(); |
| 813 | 814 |
| 814 // Check button may have appeared/disappeared. We cannot call this during | 815 // Check button may have appeared/disappeared. We cannot call this during |
| 815 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. | 816 // ViewHierarchyChanged because the |window()| pointer hasn't been set yet. |
| 816 if (window()) | 817 if (window()) |
| 817 GetDialogClientView()->UpdateDialogButtons(); | 818 GetDialogClientView()->UpdateDialogButtons(); |
| 818 } | 819 } |
| OLD | NEW |