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

Unified Diff: chromeos/dbus/shill_profile_client.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.h
diff --git a/chromeos/dbus/shill_profile_client.h b/chromeos/dbus/shill_profile_client.h
index 2c45ac72c3dca619a99063b3fe5e374a67919fc8..16a4a39f50162d08f22957a61097f6cb7acf5541 100644
--- a/chromeos/dbus/shill_profile_client.h
+++ b/chromeos/dbus/shill_profile_client.h
@@ -41,6 +41,19 @@ class CHROMEOS_EXPORT ShillProfileClient {
DictionaryValueCallbackWithoutStatus;
typedef ShillClientHelper::ErrorCallback ErrorCallback;
+ // Interface for setting up services for testing. Accessed through
+ // GetTestInterface(), only implemented in the stub implementation.
+ class TestInterface {
+ public:
+ virtual void AddProfile(const std::string& profile_path) = 0;
+ virtual void AddEntry(const std::string& profile_path,
+ const std::string& entry_path,
+ const base::DictionaryValue& properties) = 0;
+ virtual bool AddService(const std::string& service_path) = 0;
+ protected:
+ ~TestInterface() {}
+ };
+
virtual ~ShillProfileClient();
// Factory function, creates a new instance which is owned by the caller.
@@ -79,6 +92,8 @@ class CHROMEOS_EXPORT ShillProfileClient {
const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
+ // Returns an interface for testing (stub only), or returns NULL.
+ virtual TestInterface* GetTestInterface() = 0;
protected:
// Create() should be used instead.
ShillProfileClient();

Powered by Google App Engine
This is Rietveld 408576698