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

Side by Side Diff: ash/system/chromeos/power/tray_power.cc

Issue 684783004: Prefix CommandLine usage with base namespace (Part 4: ash/) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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
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/system/chromeos/power/tray_power.h" 5 #include "ash/system/chromeos/power/tray_power.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/chromeos/power/power_status_view.h" 10 #include "ash/system/chromeos/power/power_status_view.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 } 230 }
231 231
232 bool battery_alert = UpdateNotificationState(); 232 bool battery_alert = UpdateNotificationState();
233 if (power_tray_) 233 if (power_tray_)
234 power_tray_->UpdateStatus(battery_alert); 234 power_tray_->UpdateStatus(battery_alert);
235 if (notification_view_) 235 if (notification_view_)
236 notification_view_->UpdateStatus(); 236 notification_view_->UpdateStatus();
237 237
238 // Factory testing may place the battery into unusual states. 238 // Factory testing may place the battery into unusual states.
239 if (CommandLine::ForCurrentProcess()->HasSwitch( 239 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
240 ash::switches::kAshHideNotificationsForFactory)) 240 ash::switches::kAshHideNotificationsForFactory))
241 return; 241 return;
242 242
243 MaybeShowUsbChargerNotification(); 243 MaybeShowUsbChargerNotification();
244 244
245 if (battery_alert) 245 if (battery_alert)
246 ShowNotificationView(); 246 ShowNotificationView();
247 else if (notification_state_ == NOTIFICATION_NONE) 247 else if (notification_state_ == NOTIFICATION_NONE)
248 HideNotificationView(); 248 HideNotificationView();
249 249
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 390
391 if (current_charger != UNKNOWN_CHARGER) { 391 if (current_charger != UNKNOWN_CHARGER) {
392 UMA_HISTOGRAM_ENUMERATION("Power.ChargerType", 392 UMA_HISTOGRAM_ENUMERATION("Power.ChargerType",
393 current_charger, 393 current_charger,
394 CHARGER_TYPE_COUNT); 394 CHARGER_TYPE_COUNT);
395 } 395 }
396 } 396 }
397 397
398 } // namespace ash 398 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/content_client/shell_main_delegate.cc ('k') | ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698