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

Unified Diff: chromeos/dbus/fake_dbus_thread_manager.h

Issue 181413006: Replace misc. network stub flags with more flexible ones (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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
Index: chromeos/dbus/fake_dbus_thread_manager.h
diff --git a/chromeos/dbus/fake_dbus_thread_manager.h b/chromeos/dbus/fake_dbus_thread_manager.h
index b541ffb7cc2e439dfd3d0be2facb51c28209f86b..ea822a43c04cba6cb3fd00d035644e8130f9cc55 100644
--- a/chromeos/dbus/fake_dbus_thread_manager.h
+++ b/chromeos/dbus/fake_dbus_thread_manager.h
@@ -5,6 +5,7 @@
#ifndef CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
#define CHROMEOS_DBUS_FAKE_DBUS_THREAD_MANAGER_H_
+#include <map>
#include <string>
#include "base/logging.h"
@@ -104,7 +105,27 @@ class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
virtual SystemClockClient* GetSystemClockClient() OVERRIDE;
virtual UpdateEngineClient* GetUpdateEngineClient() OVERRIDE;
+ virtual int GetPowerCycleDelay() const OVERRIDE;
+ virtual int GetShillInteractiveDelay() const OVERRIDE;
+ virtual std::string GetShillInitialState(
+ const std::string& type) const OVERRIDE;
+
private:
+ // Parses the command line for Power stub switches and sets initial states.
+ void ParsePowerCommandLineSwitch();
+
+ // Parses the command line for Shill stub switches and sets initial states.
+ void ParseShillCommandLineSwitch();
+
+ // Parses options of format foo=bar, setting *arg0=foo, *arg1=bar (optional).
+ // Returns true if parsed successfully, false otherwise.
+ bool GetOptionArgs(const std::string& option,
+ std::string* arg0,
+ std::string* arg1);
+
+ // Sets the initial state for Shill networks matching |type_arg|.
+ void SetShillInitialNetworkState(std::string type_arg, std::string state_arg);
+
// Note: Keep this before other members so they can call AddObserver() in
// their c'tors.
ObserverList<DBusThreadManagerObserver> observers_;
@@ -141,6 +162,10 @@ class CHROMEOS_EXPORT FakeDBusThreadManager : public DBusThreadManager {
scoped_ptr<PowerPolicyController> power_policy_controller_;
+ int power_cycle_delay_; // Seconds over which to cycle power state
+ int shill_interactive_delay_; // Seconds to delay interactive actions
pneubeck (no reviews) 2014/02/27 09:04:37 you could put these two shill_* members into a Shi
stevenjb 2014/02/28 02:44:06 Moved implementation to clients.
+ std::map<std::string, std::string> shill_initial_state_map_;
+
DISALLOW_COPY_AND_ASSIGN(FakeDBusThreadManager);
};

Powered by Google App Engine
This is Rietveld 408576698