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

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 275543005: Use GUID instead of ServicePath in networkingPrivate API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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/fake_shill_service_client.cc
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index ef4ffe6e5d055036b3d89332433dba7d31019927..70fe38d956090c825fc21b4286c8b1c2843208f4 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -309,12 +309,14 @@ void FakeShillServiceClient::AddService(const std::string& service_path,
const std::string& state,
bool add_to_visible_list,
bool add_to_watch_list) {
- AddServiceWithIPConfig(service_path, name, type, state, "",
+ AddServiceWithIPConfig(service_path, "" /* guid */, name,
+ type, state, "" /* ipconfig_path */,
add_to_visible_list, add_to_watch_list);
}
void FakeShillServiceClient::AddServiceWithIPConfig(
const std::string& service_path,
+ const std::string& guid,
const std::string& name,
const std::string& type,
const std::string& state,
@@ -330,6 +332,13 @@ void FakeShillServiceClient::AddServiceWithIPConfig(
base::DictionaryValue* properties =
GetModifiableServiceProperties(service_path, true);
connect_behavior_.erase(service_path);
+ if (!guid.empty()) {
+ // If |guid| is not provided, leave it blank. Shill does not enforce a
+ // valid guid, we do that at the NetworkStateHandler layer.
+ properties->SetWithoutPathExpansion(
+ shill::kGuidProperty,
+ base::Value::CreateStringValue(guid));
pneubeck (no reviews) 2014/05/12 13:37:07 optional nit: CreateStringValue is deprecated, use
stevenjb 2014/05/13 01:19:00 Fixed throughout this file (not too many).
+ }
shill_property_util::SetSSID(name, properties);
properties->SetWithoutPathExpansion(
shill::kNameProperty,

Powered by Google App Engine
This is Rietveld 408576698