Index: ash/common/system/update/tray_update.cc |
diff --git a/ash/common/system/update/tray_update.cc b/ash/common/system/update/tray_update.cc |
index 47e6cc2732e6b57845534ff6a35707dc908b6dcf..7d585199ff42fd677ef30ab8d31995017e6ff381 100644 |
--- a/ash/common/system/update/tray_update.cc |
+++ b/ash/common/system/update/tray_update.cc |
@@ -116,6 +116,8 @@ class UpdateView : public ActionableView { |
UpdateStyle(); |
SetInkDropMode(InkDropHostView::InkDropMode::ON); |
} |
+ |
+ component_update_required_ = info.component_update_required; |
} |
~UpdateView() override {} |
@@ -129,7 +131,8 @@ class UpdateView : public ActionableView { |
// Overridden from ActionableView. |
bool PerformAction(const ui::Event& event) override { |
- WmShell::Get()->system_tray_controller()->RequestRestartForUpdate(); |
+ WmShell::Get()->system_tray_controller()->RequestRestartForUpdate( |
+ component_update_required_); |
WmShell::Get()->RecordUserMetricsAction( |
UMA_STATUS_AREA_OS_UPDATE_DEFAULT_SELECTED); |
CloseSystemBubble(); |
@@ -145,6 +148,7 @@ class UpdateView : public ActionableView { |
} |
views::Label* label_; |
James Cook
2016/11/30 23:01:41
nit (if you keep this): either label_ = nullptr he
|
+ bool component_update_required_ = false; |
DISALLOW_COPY_AND_ASSIGN(UpdateView); |
}; |
@@ -169,7 +173,9 @@ bool TrayUpdate::GetInitialVisibility() { |
views::View* TrayUpdate::CreateDefaultView(LoginStatus status) { |
UpdateInfo info; |
WmShell::Get()->system_tray_delegate()->GetSystemUpdateInfo(&info); |
- return info.update_required ? new UpdateView(this, info) : nullptr; |
+ return info.update_required || info.component_update_required |
+ ? new UpdateView(this, info) |
+ : nullptr; |
} |
void TrayUpdate::OnUpdateRecommended(const UpdateInfo& info) { |