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

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

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chromeos/network/network_sms_handler.cc ('k') | chromeos/network/network_util.cc » ('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) 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/network_state_handler.h" 5 #include "chromeos/network/network_state_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 std::string path = item->path(); 595 std::string path = item->path();
596 DCHECK(!base::ContainsKey(managed_map, path)); 596 DCHECK(!base::ContainsKey(managed_map, path));
597 managed_map[path] = std::move(item); 597 managed_map[path] = std::move(item);
598 } 598 }
599 // Clear the list (objects are temporarily owned by managed_map). 599 // Clear the list (objects are temporarily owned by managed_map).
600 managed_list->clear(); 600 managed_list->clear();
601 // Updates managed_list and request updates for new entries. 601 // Updates managed_list and request updates for new entries.
602 std::set<std::string> list_entries; 602 std::set<std::string> list_entries;
603 for (auto& iter : entries) { 603 for (auto& iter : entries) {
604 std::string path; 604 std::string path;
605 iter.GetAsString(&path); 605 iter->GetAsString(&path);
606 if (path.empty() || path == shill::kFlimflamServicePath) { 606 if (path.empty() || path == shill::kFlimflamServicePath) {
607 NET_LOG_ERROR(base::StringPrintf("Bad path in list:%d", type), path); 607 NET_LOG_ERROR(base::StringPrintf("Bad path in list:%d", type), path);
608 continue; 608 continue;
609 } 609 }
610 auto found = managed_map.find(path); 610 auto found = managed_map.find(path);
611 if (found == managed_map.end()) { 611 if (found == managed_map.end()) {
612 if (list_entries.count(path) != 0) { 612 if (list_entries.count(path) != 0) {
613 NET_LOG_ERROR("Duplicate entry in list", path); 613 NET_LOG_ERROR("Duplicate entry in list", path);
614 continue; 614 continue;
615 } 615 }
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 if (type.MatchesType(shill::kTypeBluetooth)) 1168 if (type.MatchesType(shill::kTypeBluetooth))
1169 technologies.emplace_back(shill::kTypeBluetooth); 1169 technologies.emplace_back(shill::kTypeBluetooth);
1170 if (type.MatchesType(shill::kTypeVPN)) 1170 if (type.MatchesType(shill::kTypeVPN))
1171 technologies.emplace_back(shill::kTypeVPN); 1171 technologies.emplace_back(shill::kTypeVPN);
1172 1172
1173 CHECK_GT(technologies.size(), 0ul); 1173 CHECK_GT(technologies.size(), 0ul);
1174 return technologies; 1174 return technologies;
1175 } 1175 }
1176 1176
1177 } // namespace chromeos 1177 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_sms_handler.cc ('k') | chromeos/network/network_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698