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

Side by Side Diff: extensions/browser/api/networking_private/networking_private_linux.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
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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 network_map_.swap(network_map); 636 network_map_.swap(network_map);
637 SendNetworkListChangedEvent(*network_list); 637 SendNetworkListChangedEvent(*network_list);
638 } 638 }
639 639
640 void NetworkingPrivateLinux::SendNetworkListChangedEvent( 640 void NetworkingPrivateLinux::SendNetworkListChangedEvent(
641 const base::ListValue& network_list) { 641 const base::ListValue& network_list) {
642 GuidList guidsForEventCallback; 642 GuidList guidsForEventCallback;
643 643
644 for (const auto& network : network_list) { 644 for (const auto& network : network_list) {
645 std::string guid; 645 std::string guid;
646 const base::DictionaryValue* dict = nullptr; 646 base::DictionaryValue* dict;
647 if (network.GetAsDictionary(&dict)) { 647 if (network->GetAsDictionary(&dict)) {
648 if (dict->GetString(kAccessPointInfoGuid, &guid)) { 648 if (dict->GetString(kAccessPointInfoGuid, &guid)) {
649 guidsForEventCallback.push_back(guid); 649 guidsForEventCallback.push_back(guid);
650 } 650 }
651 } 651 }
652 } 652 }
653 653
654 OnNetworkListChangedEventOnUIThread(guidsForEventCallback); 654 OnNetworkListChangedEventOnUIThread(guidsForEventCallback);
655 } 655 }
656 656
657 bool NetworkingPrivateLinux::GetNetworkDevices( 657 bool NetworkingPrivateLinux::GetNetworkDevices(
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 base::Unretained(this), base::Passed(&guid_list))); 1202 base::Unretained(this), base::Passed(&guid_list)));
1203 } 1203 }
1204 1204
1205 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1205 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1206 std::unique_ptr<GuidList> guid_list) { 1206 std::unique_ptr<GuidList> guid_list) {
1207 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1207 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1208 OnNetworksChangedEventOnUIThread(*guid_list); 1208 OnNetworksChangedEventOnUIThread(*guid_list);
1209 } 1209 }
1210 1210
1211 } // namespace extensions 1211 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698