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

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

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Fix Android Compilation Error 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_chromeos. h" 5 #include "extensions/browser/api/networking_private/networking_private_chromeos. h"
6 6
7 #include <memory> 7 #include <memory>
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 bool visible_only, 463 bool visible_only,
464 int limit, 464 int limit,
465 const NetworkListCallback& success_callback, 465 const NetworkListCallback& success_callback,
466 const FailureCallback& failure_callback) { 466 const FailureCallback& failure_callback) {
467 NetworkTypePattern pattern = 467 NetworkTypePattern pattern =
468 chromeos::onc::NetworkTypePatternFromOncType(network_type); 468 chromeos::onc::NetworkTypePatternFromOncType(network_type);
469 std::unique_ptr<base::ListValue> network_properties_list = 469 std::unique_ptr<base::ListValue> network_properties_list =
470 chromeos::network_util::TranslateNetworkListToONC( 470 chromeos::network_util::TranslateNetworkListToONC(
471 pattern, configured_only, visible_only, limit); 471 pattern, configured_only, visible_only, limit);
472 472
473 for (const auto& value : *network_properties_list) { 473 for (auto& value : *network_properties_list) {
474 base::DictionaryValue* network_dict = nullptr; 474 base::DictionaryValue* network_dict = nullptr;
475 value->GetAsDictionary(&network_dict); 475 value.GetAsDictionary(&network_dict);
476 DCHECK(network_dict); 476 DCHECK(network_dict);
477 if (GetThirdPartyVPNDictionary(network_dict)) 477 if (GetThirdPartyVPNDictionary(network_dict))
478 AppendThirdPartyProviderName(network_dict); 478 AppendThirdPartyProviderName(network_dict);
479 } 479 }
480 480
481 success_callback.Run(std::move(network_properties_list)); 481 success_callback.Run(std::move(network_properties_list));
482 } 482 }
483 483
484 void NetworkingPrivateChromeOS::StartConnect( 484 void NetworkingPrivateChromeOS::StartConnect(
485 const std::string& guid, 485 const std::string& guid,
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 // Eventually the caller (e.g. Settings) should handle any failures and 852 // Eventually the caller (e.g. Settings) should handle any failures and
853 // show its own configuration UI. crbug.com/380937. 853 // show its own configuration UI. crbug.com/380937.
854 if (ui_delegate()->HandleConnectFailed(guid, error_name)) { 854 if (ui_delegate()->HandleConnectFailed(guid, error_name)) {
855 success_callback.Run(); 855 success_callback.Run();
856 return; 856 return;
857 } 857 }
858 failure_callback.Run(error_name); 858 failure_callback.Run(error_name);
859 } 859 }
860 860
861 } // namespace extensions 861 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698