Index: chromeos/dbus/power_manager_client.cc |
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc |
index 9019dd9c0e042d3d4a0cf3b0e7ab2d2d332f5c48..db4ec08d71f9e0af0ae6a81ee572f059e081409b 100644 |
--- a/chromeos/dbus/power_manager_client.cc |
+++ b/chromeos/dbus/power_manager_client.cc |
@@ -8,7 +8,6 @@ |
#include "base/bind.h" |
#include "base/callback.h" |
-#include "base/command_line.h" |
#include "base/format_macros.h" |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
@@ -18,7 +17,7 @@ |
#include "base/threading/platform_thread.h" |
#include "base/time/time.h" |
#include "base/timer/timer.h" |
-#include "chromeos/chromeos_switches.h" |
+#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/power_manager/input_event.pb.h" |
#include "chromeos/dbus/power_manager/peripheral_battery_status.pb.h" |
#include "chromeos/dbus/power_manager/policy.pb.h" |
@@ -675,12 +674,11 @@ class PowerManagerClientStubImpl : public PowerManagerClient { |
// PowerManagerClient overrides: |
virtual void Init(dbus::Bus* bus) OVERRIDE { |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
- chromeos::switches::kEnableStubInteractive)) { |
- const int kStatusUpdateMs = 1000; |
+ int cycle_delay = DBusThreadManager::Get()->GetPowerCycleDelay(); |
+ if (cycle_delay) { |
update_timer_.Start(FROM_HERE, |
- base::TimeDelta::FromMilliseconds(kStatusUpdateMs), this, |
- &PowerManagerClientStubImpl::UpdateStatus); |
+ base::TimeDelta::FromSeconds(cycle_delay), this, |
+ &PowerManagerClientStubImpl::UpdateStatus); |
} |
} |