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

Unified Diff: chrome/browser/chromeos/low_battery_observer.cc

Issue 8263003: cros: PowerLibrary virtual functions should be named using CamelCase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | chrome/browser/chromeos/status/power_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/low_battery_observer.cc
diff --git a/chrome/browser/chromeos/low_battery_observer.cc b/chrome/browser/chromeos/low_battery_observer.cc
index 6e307ea2e8ab22a6e64df3d089deebd59fcdd1ca..fea2d0d60b0533f4613e1151064a50e358b213e2 100644
--- a/chrome/browser/chromeos/low_battery_observer.cc
+++ b/chrome/browser/chromeos/low_battery_observer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,7 +22,7 @@ LowBatteryObserver::~LowBatteryObserver() {
Hide();
}
-void LowBatteryObserver::PowerChanged(PowerLibrary* object) {
+void LowBatteryObserver::PowerChanged(PowerLibrary* power_lib) {
const int limit_min = 15; // Notification will show when remaining number
// of minutes is <= limit.
const int limit_max = 30; // Notification will hid when remaining number
@@ -30,14 +30,15 @@ void LowBatteryObserver::PowerChanged(PowerLibrary* object) {
const int critical = 5; // Notification will be forced visible if hidden
// by user when time remaining <= critical.
- base::TimeDelta remaining = object->battery_time_to_empty();
+ base::TimeDelta remaining = power_lib->GetBatteryTimeToEmpty();
int remaining_minutes = remaining.InMinutes();
// To simplify the logic - we handle the case of calculating the remaining
// time as if we were on line power.
// remaining time of zero means still calculating, this is denoted by
// base::TimeDelta().
- bool line_power = object->line_power_on() || remaining == base::TimeDelta();
+ bool line_power = power_lib->IsLinePowerOn() ||
+ remaining == base::TimeDelta();
// The urgent flag is used to re-notify the user if the power level
// goes critical. We only want to do this once even if the time remaining
« no previous file with comments | « chrome/browser/chromeos/cros/power_library.cc ('k') | chrome/browser/chromeos/status/power_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698