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

Unified Diff: chromeos/dbus/shill_profile_client_stub.h

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to local helper functions and fixed some nits. 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 b26b5a7d8a120f9e4a1533a5717ef5cb1d567f1f..411710b0d65a3a7438a496386d60cf921a6979e7 100644
--- a/chromeos/dbus/shill_profile_client_stub.h
+++ b/chromeos/dbus/shill_profile_client_stub.h
@@ -13,7 +13,8 @@
namespace chromeos {
// A stub implementation of ShillProfileClient.
-class ShillProfileClientStub : public ShillProfileClient {
+class ShillProfileClientStub : public ShillProfileClient,
+ public ShillProfileClient::TestInterface {
public:
ShillProfileClientStub();
virtual ~ShillProfileClientStub();
@@ -37,15 +38,26 @@ class ShillProfileClientStub : public ShillProfileClient {
const std::string& entry_path,
const base::Closure& callback,
const ErrorCallback& error_callback) OVERRIDE;
+ virtual ShillProfileClient::TestInterface* GetTestInterface() OVERRIDE;
+
+ // ShillProfileClient::TestInterface overrides.
+ virtual void AddProfile(const std::string& profile_path) 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:
- void PassEmptyDictionaryValue(
- const DictionaryValueCallbackWithoutStatus& callback) const;
+ base::DictionaryValue* GetProfile(const dbus::ObjectPath& profile_path,
+ const ErrorCallback& error_callback);
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<ShillProfileClientStub> weak_ptr_factory_;
+ // This maps profile path -> entry path -> Shill properties.
+ base::DictionaryValue profile_entries_;
+
DISALLOW_COPY_AND_ASSIGN(ShillProfileClientStub);
};

Powered by Google App Engine
This is Rietveld 408576698