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

Unified Diff: chromeos/dbus/shill_profile_client_stub.h

Issue 13957012: Adding a NetworkProfileHandler used by ManagedNetworkConfigurationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 years, 8 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/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..25dda897ea4e684fe71324d1ac26d7a23385e187 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,8 @@ namespace chromeos {
class ShillProfileClientStub : public ShillProfileClient,
public ShillProfileClient::TestInterface {
public:
- ShillProfileClientStub();
+ explicit ShillProfileClientStub(
+ ShillManagerClient::TestInterface* manager_test);
stevenjb 2013/04/26 21:00:49 I don't know that I like this. Is there ever a sit
pneubeck (no reviews) 2013/04/29 18:05:51 My thoughts were: 1. managed_network_configuration
stevenjb 2013/04/30 17:42:47 I believe strongly that we *shouldn't* combine moc
pneubeck (no reviews) 2013/05/03 17:32:55 I have to use the ClientMocks in the unit test to
virtual ~ShillProfileClientStub();
// ShillProfileClient overrides.
@@ -41,18 +44,25 @@ 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_;
+
+ ShillManagerClient::TestInterface* manager_test_;
DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStub);
};

Powered by Google App Engine
This is Rietveld 408576698