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

Side by Side Diff: chromeos/network/shill_property_handler.cc

Issue 11361274: Add NetworkStateListDetailedView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang warning Created 8 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/network/shill_property_handler.h" 5 #include "chromeos/network/shill_property_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 if (notify) 145 if (notify)
146 listener_->ManagerPropertyChanged(); 146 listener_->ManagerPropertyChanged();
147 } 147 }
148 148
149 bool ShillPropertyHandler::ManagerPropertyChanged(const std::string& key, 149 bool ShillPropertyHandler::ManagerPropertyChanged(const std::string& key,
150 const base::Value& value) { 150 const base::Value& value) {
151 bool notify_manager_changed = false; 151 bool notify_manager_changed = false;
152 if (key == flimflam::kServicesProperty) { 152 if (key == flimflam::kServicesProperty) {
153 const base::ListValue* vlist = GetListValue(key, value); 153 const base::ListValue* vlist = GetListValue(key, value);
154 if (vlist) 154 if (vlist) {
155 UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist); 155 UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
156 } else if (key == flimflam::kServiceWatchListProperty) { 156 // TODO(stevenjb): Use kServiceWatchListProperty and request properties
gauravsh 2012/11/27 20:48:09 Any reason why you got rid of the service watch li
stevenjb 2012/11/27 22:19:19 I can put this in a separate CL and implement it c
157 const base::ListValue* vlist = GetListValue(key, value); 157 // for new entries.
158 if (vlist) {
159 UpdateObservedNetworkServices(*vlist); 158 UpdateObservedNetworkServices(*vlist);
160 } 159 }
161 } else if (key == flimflam::kDevicesProperty) { 160 } else if (key == flimflam::kDevicesProperty) {
162 const ListValue* vlist = GetListValue(key, value); 161 const ListValue* vlist = GetListValue(key, value);
163 if (vlist) 162 if (vlist)
164 UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist); 163 UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist);
165 } else if (key == flimflam::kAvailableTechnologiesProperty) { 164 } else if (key == flimflam::kAvailableTechnologiesProperty) {
166 const base::ListValue* vlist = GetListValue(key, value); 165 const base::ListValue* vlist = GetListValue(key, value);
167 if (vlist) { 166 if (vlist) {
168 listener_->UpdateAvailableTechnologies(*vlist); 167 listener_->UpdateAvailableTechnologies(*vlist);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 if (!properties.GetStringWithoutPathExpansion(flimflam::kAddressProperty, 277 if (!properties.GetStringWithoutPathExpansion(flimflam::kAddressProperty,
279 &ip_address)) { 278 &ip_address)) {
280 LOG(ERROR) << "Failed to get IP Address property for: " << service_path; 279 LOG(ERROR) << "Failed to get IP Address property for: " << service_path;
281 return; 280 return;
282 } 281 }
283 listener_->UpdateNetworkServiceIPAddress(service_path, ip_address); 282 listener_->UpdateNetworkServiceIPAddress(service_path, ip_address);
284 } 283 }
285 284
286 } // namespace internal 285 } // namespace internal
287 } // namespace chromeos 286 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698