summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status/power_menu_button.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 20:53:06 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 20:53:06 +0000
commit08f3ac481ed50bf2975f2dfbd20aefd712450680 (patch)
treed8960a5e43c87b9a8b69a425f4aaf925405c4656 /chrome/browser/chromeos/status/power_menu_button.cc
parent06c3b84aa5849305e37034e4fce0573d59f48567 (diff)
downloadchromium_src-08f3ac481ed50bf2975f2dfbd20aefd712450680.zip
chromium_src-08f3ac481ed50bf2975f2dfbd20aefd712450680.tar.gz
chromium_src-08f3ac481ed50bf2975f2dfbd20aefd712450680.tar.bz2
Use new libcros loading api to display better error messages.
Also remove all EnsureLoaded() methods except one. Review URL: http://codereview.chromium.org/671004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/status/power_menu_button.cc')
-rw-r--r--chrome/browser/chromeos/status/power_menu_button.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/status/power_menu_button.cc b/chrome/browser/chromeos/status/power_menu_button.cc
index b277654..48615c1 100644
--- a/chrome/browser/chromeos/status/power_menu_button.cc
+++ b/chrome/browser/chromeos/status/power_menu_button.cc
@@ -8,6 +8,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/time.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -123,7 +124,7 @@ void PowerMenuButton::DrawPowerIcon(gfx::Canvas* canvas, SkBitmap icon) {
void PowerMenuButton::UpdateIcon() {
PowerLibrary* cros = PowerLibrary::Get();
int id = IDR_STATUSBAR_BATTERY_UNKNOWN;
- if (PowerLibrary::EnsureLoaded()) {
+ if (CrosLibrary::EnsureLoaded()) {
if (!cros->battery_is_present()) {
id = IDR_STATUSBAR_BATTERY_MISSING;
} else if (cros->line_power_on() && cros->battery_fully_charged()) {