Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: ash/common/system/update/tray_update.cc

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | ash/common/system/user/user_card_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/common/system/update/tray_update.h" 5 #include "ash/common/system/update/tray_update.h"
6 6
7 #include "ash/common/metrics/user_metrics_action.h" 7 #include "ash/common/metrics/user_metrics_action.h"
8 #include "ash/common/strings/grit/ash_strings.h" 8 #include "ash/common/strings/grit/ash_strings.h"
9 #include "ash/common/system/tray/fixed_sized_image_view.h" 9 #include "ash/common/system/tray/fixed_sized_image_view.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 kSystemMenuUpdateIcon, 75 kSystemMenuUpdateIcon,
76 IconColorForUpdateSeverity(owner->severity_, true))); 76 IconColorForUpdateSeverity(owner->severity_, true)));
77 tri_view->AddView(TriView::Container::START, image); 77 tri_view->AddView(TriView::Container::START, image);
78 78
79 base::string16 label_text = 79 base::string16 label_text =
80 owner->factory_reset_required_ 80 owner->factory_reset_required_
81 ? bundle.GetLocalizedString( 81 ? bundle.GetLocalizedString(
82 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE) 82 IDS_ASH_STATUS_TRAY_RESTART_AND_POWERWASH_TO_UPDATE)
83 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE); 83 : bundle.GetLocalizedString(IDS_ASH_STATUS_TRAY_UPDATE);
84 SetAccessibleName(label_text); 84 SetAccessibleName(label_text);
85 auto label = TrayPopupUtils::CreateDefaultLabel(); 85 auto* label = TrayPopupUtils::CreateDefaultLabel();
86 label->SetText(label_text); 86 label->SetText(label_text);
87 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL); 87 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::DEFAULT_VIEW_LABEL);
88 style.SetupLabel(label); 88 style.SetupLabel(label);
89 tri_view->AddView(TriView::Container::CENTER, label); 89 tri_view->AddView(TriView::Container::CENTER, label);
90 90
91 SetInkDropMode(InkDropHostView::InkDropMode::ON); 91 SetInkDropMode(InkDropHostView::InkDropMode::ON);
92 } 92 }
93 93
94 ~UpdateView() override {} 94 ~UpdateView() override {}
95 95
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 update_required_ = true; 127 update_required_ = true;
128 severity_ = severity; 128 severity_ = severity;
129 factory_reset_required_ = factory_reset_required; 129 factory_reset_required_ = factory_reset_required;
130 130
131 // Show the icon in the tray. 131 // Show the icon in the tray.
132 SetIconColor(IconColorForUpdateSeverity(severity_, false)); 132 SetIconColor(IconColorForUpdateSeverity(severity_, false));
133 tray_view()->SetVisible(true); 133 tray_view()->SetVisible(true);
134 } 134 }
135 135
136 } // namespace ash 136 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | ash/common/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698