Chromium Code Reviews| Index: chromeos/dbus/shill_profile_client_stub.h |
| diff --git a/chromeos/dbus/shill_profile_client_stub.h b/chromeos/dbus/shill_profile_client_stub.h |
| index efc86ce8da92c67efbe543c86c6c6a1162124807..e9d08cdbe3f2c635639efcd0c63adc3ddd9989a3 100644 |
| --- a/chromeos/dbus/shill_profile_client_stub.h |
| +++ b/chromeos/dbus/shill_profile_client_stub.h |
| @@ -5,9 +5,11 @@ |
| #ifndef CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_STUB_H_ |
| #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_STUB_H_ |
| +#include <map> |
| #include <string> |
| #include "base/basictypes.h" |
| +#include "chromeos/dbus/shill_manager_client.h" |
| #include "chromeos/dbus/shill_profile_client.h" |
| namespace chromeos { |
| @@ -16,7 +18,7 @@ namespace chromeos { |
| class ShillProfileClientStub : public ShillProfileClient, |
| public ShillProfileClient::TestInterface { |
| public: |
| - ShillProfileClientStub(); |
| + explicit ShillProfileClientStub(); |
|
stevenjb
2013/05/03 18:34:53
nit: no need for explicit now
pneubeck (no reviews)
2013/05/06 07:24:43
Done.
pneubeck (no reviews)
2013/05/06 07:24:43
Done.
|
| virtual ~ShillProfileClientStub(); |
| // ShillProfileClient overrides. |
| @@ -41,18 +43,23 @@ class ShillProfileClientStub : public ShillProfileClient, |
| virtual ShillProfileClient::TestInterface* GetTestInterface() OVERRIDE; |
| // ShillProfileClient::TestInterface overrides. |
| - virtual void AddProfile(const std::string& profile_path) OVERRIDE; |
| + virtual void AddProfile(const std::string& profile_path, |
| + const std::string& userhash) OVERRIDE; |
| virtual void AddEntry(const std::string& profile_path, |
| const std::string& entry_path, |
| const base::DictionaryValue& properties) OVERRIDE; |
| virtual bool AddService(const std::string& service_path) OVERRIDE; |
| private: |
| - base::DictionaryValue* GetProfile(const dbus::ObjectPath& profile_path, |
| - const ErrorCallback& error_callback); |
| + struct ProfileProperties; |
| + typedef std::map<std::string, ProfileProperties*> ProfileMap; |
| - // This maps profile path -> entry path -> Shill properties. |
| - base::DictionaryValue profile_entries_; |
| + ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, |
| + const ErrorCallback& error_callback); |
| + |
| + // The values are owned by this class and are explicitly destroyed where |
| + // necessary. |
| + ProfileMap profiles_; |
| DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStub); |
| }; |