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

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

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 6 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 } 372 }
373 requested_updates.swap(new_requested_updates); 373 requested_updates.swap(new_requested_updates);
374 } 374 }
375 375
376 void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type, 376 void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
377 const base::ListValue& entries) { 377 const base::ListValue& entries) {
378 ShillPropertyObserverMap& observer_map = 378 ShillPropertyObserverMap& observer_map =
379 (type == ManagedState::MANAGED_TYPE_NETWORK) ? observed_networks_ 379 (type == ManagedState::MANAGED_TYPE_NETWORK) ? observed_networks_
380 : observed_devices_; 380 : observed_devices_;
381 ShillPropertyObserverMap new_observed; 381 ShillPropertyObserverMap new_observed;
382 for (auto* entry : entries) { 382 for (const auto& entry : entries) {
383 std::string path; 383 std::string path;
384 entry->GetAsString(&path); 384 entry->GetAsString(&path);
385 if (path.empty()) 385 if (path.empty())
386 continue; 386 continue;
387 auto iter = observer_map.find(path); 387 auto iter = observer_map.find(path);
388 ShillPropertyObserver* observer; 388 ShillPropertyObserver* observer;
389 if (iter != observer_map.end()) { 389 if (iter != observer_map.end()) {
390 observer = iter->second; 390 observer = iter->second;
391 } else { 391 } else {
392 // Create an observer for future updates. 392 // Create an observer for future updates.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path 561 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path
562 << ": " << call_status << ", For: " << path; 562 << ": " << call_status << ", For: " << path;
563 return; 563 return;
564 } 564 }
565 NET_LOG(EVENT) << "IP Config properties received: " << path; 565 NET_LOG(EVENT) << "IP Config properties received: " << path;
566 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties); 566 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties);
567 } 567 }
568 568
569 } // namespace internal 569 } // namespace internal
570 } // namespace chromeos 570 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/prohibited_technologies_handler.cc ('k') | chromeos/system/statistics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698