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

Side by Side Diff: chromeos/dbus/shill_manager_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: rebase 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.h ('k') | chromeos/dbus/shill_service_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/dbus/shill_manager_client_stub.h" 5 #include "chromeos/dbus/shill_manager_client_stub.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 std::string type; 169 std::string type;
170 if (!properties.GetString(flimflam::kGuidProperty, &guid) || 170 if (!properties.GetString(flimflam::kGuidProperty, &guid) ||
171 !properties.GetString(flimflam::kTypeProperty, &type)) { 171 !properties.GetString(flimflam::kTypeProperty, &type)) {
172 // If the properties aren't filled out completely, then just return an empty 172 // If the properties aren't filled out completely, then just return an empty
173 // object path. 173 // object path.
174 MessageLoop::current()->PostTask( 174 MessageLoop::current()->PostTask(
175 FROM_HERE, base::Bind(callback, dbus::ObjectPath())); 175 FROM_HERE, base::Bind(callback, dbus::ObjectPath()));
176 return; 176 return;
177 } 177 }
178 178
179 std::string ipconfig_path;
180 properties.GetString(shill::kIPConfigProperty, &ipconfig_path);
181
179 // Add the service to the service client stub if not already there. 182 // Add the service to the service client stub if not already there.
180 service_client->AddService(guid, guid, type, flimflam::kStateIdle, true); 183 service_client->AddServiceWithIPConfig(guid, guid, type, flimflam::kStateIdle,
184 ipconfig_path, true);
181 185
182 // Merge the new properties with existing properties, if any. 186 // Merge the new properties with existing properties, if any.
183 scoped_ptr<base::DictionaryValue> merged_properties; 187 scoped_ptr<base::DictionaryValue> merged_properties;
184 const base::DictionaryValue* existing_properties = 188 const base::DictionaryValue* existing_properties =
185 service_client->GetServiceProperties(guid); 189 service_client->GetServiceProperties(guid);
186 if (existing_properties) { 190 if (existing_properties) {
187 merged_properties.reset(existing_properties->DeepCopy()); 191 merged_properties.reset(existing_properties->DeepCopy());
188 } else { 192 } else {
189 merged_properties.reset(new base::DictionaryValue); 193 merged_properties.reset(new base::DictionaryValue);
190 } 194 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 std::string type; 501 std::string type;
498 properties->GetString(flimflam::kTypeProperty, &type); 502 properties->GetString(flimflam::kTypeProperty, &type);
499 if (TechnologyEnabled(type)) 503 if (TechnologyEnabled(type))
500 new_service_list->Append((*iter)->DeepCopy()); 504 new_service_list->Append((*iter)->DeepCopy());
501 } 505 }
502 } 506 }
503 return new_service_list; 507 return new_service_list;
504 } 508 }
505 509
506 } // namespace chromeos 510 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/shill_manager_client_stub.h ('k') | chromeos/dbus/shill_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698