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

Unified Diff: chromeos/dbus/fake_shill_manager_client.h

Issue 181413006: Replace misc. network stub flags with more flexible ones (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 | « chromeos/dbus/fake_dbus_thread_manager.cc ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/fake_shill_manager_client.h
diff --git a/chromeos/dbus/fake_shill_manager_client.h b/chromeos/dbus/fake_shill_manager_client.h
index cbcc404bab9147f97cf624ba57d145a0878cb123..339e0d16b8845889f2a911c8f7c95a70fc3d47e0 100644
--- a/chromeos/dbus/fake_shill_manager_client.h
+++ b/chromeos/dbus/fake_shill_manager_client.h
@@ -101,6 +101,8 @@ class CHROMEOS_EXPORT FakeShillManagerClient
virtual void ServiceStateChanged(const std::string& service_path,
const std::string& state) OVERRIDE;
virtual void SortManagerServices() OVERRIDE;
+ virtual void SetupDefaultEnvironment() OVERRIDE;
+ virtual int GetInteractiveDelay() const OVERRIDE;
private:
void AddServiceToWatchList(const std::string& service_path);
@@ -118,11 +120,28 @@ class CHROMEOS_EXPORT FakeShillManagerClient
void ScanCompleted(const std::string& device_path,
const base::Closure& callback);
+ // Parses the command line for Shill stub switches and sets initial states.
+ // Uses comma-separated name-value pairs (see SplitStringIntoKeyValuePairs):
+ // interactive={delay} - sets delay in seconds for interactive UI
+ // {wifi,cellular,etc}={on,off,disabled,none} - sets initial state for type
+ void ParseCommandLineSwitch();
+ bool ParseOption(const std::string& arg0, const std::string& arg1);
+ bool SetInitialNetworkState(std::string type_arg, std::string state_arg);
+ std::string GetInitialStateForType(const std::string& type,
+ bool* enabled);
+
// Dictionary of property name -> property value
base::DictionaryValue stub_properties_;
+
// Dictionary of technology -> list of property dictionaries
base::DictionaryValue stub_geo_networks_;
+ // Seconds to delay interactive actions
+ int interactive_delay_;
+
+ // Initial state for fake services.
+ std::map<std::string, std::string> shill_initial_state_map_;
+
ObserverList<ShillPropertyChangedObserver> observer_list_;
// Note: This should remain the last member so it'll be destroyed and
« no previous file with comments | « chromeos/dbus/fake_dbus_thread_manager.cc ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698