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

Unified Diff: chromeos/dbus/shill_service_client_stub.cc

Issue 12634019: NetworkChangeNotifierChromeos: Handle IPConfig property changes on the default network (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AddServiceWithIPConfig Created 7 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
Index: chromeos/dbus/shill_service_client_stub.cc
diff --git a/chromeos/dbus/shill_service_client_stub.cc b/chromeos/dbus/shill_service_client_stub.cc
index 0a380bc2600a09e91f52fd15c452317d7ef4f718..5dfb441312a5c05c22efdd376d4b3e32588ba6a3 100644
--- a/chromeos/dbus/shill_service_client_stub.cc
+++ b/chromeos/dbus/shill_service_client_stub.cc
@@ -254,23 +254,18 @@ void ShillServiceClientStub::AddService(const std::string& service_path,
const std::string& type,
const std::string& state,
bool add_to_watch_list) {
- DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
- AddService(service_path, add_to_watch_list);
+ AddServiceInternal(service_path, name, type, state, "", add_to_watch_list);
+}
- base::DictionaryValue* properties =
- GetModifiableServiceProperties(service_path);
- properties->SetWithoutPathExpansion(
- flimflam::kSSIDProperty,
- base::Value::CreateStringValue(service_path));
- properties->SetWithoutPathExpansion(
- flimflam::kNameProperty,
- base::Value::CreateStringValue(name));
- properties->SetWithoutPathExpansion(
- flimflam::kTypeProperty,
- base::Value::CreateStringValue(type));
- properties->SetWithoutPathExpansion(
- flimflam::kStateProperty,
- base::Value::CreateStringValue(state));
+void ShillServiceClientStub::AddServiceWithIPConfig(
+ const std::string& service_path,
+ const std::string& name,
+ const std::string& type,
+ const std::string& state,
+ const std::string& ipconfig_path,
+ bool add_to_watch_list) {
+ AddServiceInternal(service_path, name, type, state, ipconfig_path,
pneubeck (no reviews) 2013/03/28 10:37:54 Why not adding the implementation here?
gauravsh 2013/03/28 18:48:54 No particular reason. Done.
+ add_to_watch_list);
}
void ShillServiceClientStub::RemoveService(const std::string& service_path) {
@@ -302,6 +297,36 @@ void ShillServiceClientStub::ClearServices() {
stub_services_.Clear();
}
+void ShillServiceClientStub::AddServiceInternal(
+ const std::string& service_path,
+ const std::string& name,
+ const std::string& type,
+ const std::string& state,
+ const std::string& ipconfig_path,
+ bool add_to_watch_list) {
+ DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
+ AddService(service_path, add_to_watch_list);
+
+ base::DictionaryValue* properties =
+ GetModifiableServiceProperties(service_path);
+ properties->SetWithoutPathExpansion(
+ flimflam::kSSIDProperty,
+ base::Value::CreateStringValue(service_path));
+ properties->SetWithoutPathExpansion(
+ flimflam::kNameProperty,
+ base::Value::CreateStringValue(name));
+ properties->SetWithoutPathExpansion(
+ flimflam::kTypeProperty,
+ base::Value::CreateStringValue(type));
+ properties->SetWithoutPathExpansion(
+ flimflam::kStateProperty,
+ base::Value::CreateStringValue(state));
+ if (!ipconfig_path.empty())
+ properties->SetWithoutPathExpansion(
+ shill::kIPConfigProperty,
+ base::Value::CreateStringValue(ipconfig_path));
+}
+
void ShillServiceClientStub::SetDefaultProperties() {
const bool add_to_watchlist = true;

Powered by Google App Engine
This is Rietveld 408576698