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

Side by Side Diff: extensions/browser/api/networking_private/networking_private_linux.cc

Issue 2323993004: Remove use of deprecated base::ListValue::Append(Value*) overload in extensions. (Closed)
Patch Set: ... I hate C++ Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/networking_private/networking_private_linux.h" 5 #include "extensions/browser/api/networking_private/networking_private_linux.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/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 return ParseNetworkGuid(guid, &unused_1, &unused_2, ssid); 76 return ParseNetworkGuid(guid, &unused_1, &unused_2, ssid);
77 } 77 }
78 78
79 // Iterates over the map cloning the contained networks to a 79 // Iterates over the map cloning the contained networks to a
80 // list then returns the list. 80 // list then returns the list.
81 std::unique_ptr<base::ListValue> CopyNetworkMapToList( 81 std::unique_ptr<base::ListValue> CopyNetworkMapToList(
82 const NetworkingPrivateLinux::NetworkMap& network_map) { 82 const NetworkingPrivateLinux::NetworkMap& network_map) {
83 std::unique_ptr<base::ListValue> network_list(new base::ListValue); 83 std::unique_ptr<base::ListValue> network_list(new base::ListValue);
84 84
85 for (const auto& network : network_map) { 85 for (const auto& network : network_map) {
86 network_list->Append(network.second->DeepCopy()); 86 network_list->Append(network.second->CreateDeepCopy());
87 } 87 }
88 88
89 return network_list; 89 return network_list;
90 } 90 }
91 91
92 // Constructs a network guid from its constituent parts. 92 // Constructs a network guid from its constituent parts.
93 std::string ConstructNetworkGuid(const dbus::ObjectPath& device_path, 93 std::string ConstructNetworkGuid(const dbus::ObjectPath& device_path,
94 const dbus::ObjectPath& access_point_path, 94 const dbus::ObjectPath& access_point_path,
95 const std::string& ssid) { 95 const std::string& ssid) {
96 return device_path.value() + "|" + access_point_path.value() + "|" + ssid; 96 return device_path.value() + "|" + access_point_path.value() + "|" + ssid;
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 base::Unretained(this), base::Passed(&guid_list))); 1199 base::Unretained(this), base::Passed(&guid_list)));
1200 } 1200 }
1201 1201
1202 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1202 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1203 std::unique_ptr<GuidList> guid_list) { 1203 std::unique_ptr<GuidList> guid_list) {
1204 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1204 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1205 OnNetworksChangedEventOnUIThread(*guid_list); 1205 OnNetworksChangedEventOnUIThread(*guid_list);
1206 } 1206 }
1207 1207
1208 } // namespace extensions 1208 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_controller.h ('k') | extensions/browser/api/printer_provider/printer_provider_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698