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

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

Issue 2236443003: extensions: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't add braces Created 4 years, 4 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 technologies_found.insert(onc_type); 581 technologies_found.insert(onc_type);
582 } 582 }
583 583
584 // For any technologies that we do not have a DeviceState entry for, append 584 // For any technologies that we do not have a DeviceState entry for, append
585 // an entry if the technolog is available. 585 // an entry if the technolog is available.
586 const char* technology_types[] = {::onc::network_type::kEthernet, 586 const char* technology_types[] = {::onc::network_type::kEthernet,
587 ::onc::network_type::kWiFi, 587 ::onc::network_type::kWiFi,
588 ::onc::network_type::kWimax, 588 ::onc::network_type::kWimax,
589 ::onc::network_type::kCellular}; 589 ::onc::network_type::kCellular};
590 for (const char* technology : technology_types) { 590 for (const char* technology : technology_types) {
591 if (ContainsValue(technologies_found, technology)) 591 if (base::ContainsValue(technologies_found, technology))
592 continue; 592 continue;
593 AppendDeviceState(technology, nullptr /* device */, 593 AppendDeviceState(technology, nullptr /* device */,
594 device_state_list.get()); 594 device_state_list.get());
595 } 595 }
596 return device_state_list; 596 return device_state_list;
597 } 597 }
598 598
599 bool NetworkingPrivateChromeOS::EnableNetworkType(const std::string& type) { 599 bool NetworkingPrivateChromeOS::EnableNetworkType(const std::string& type) {
600 NetworkTypePattern pattern = 600 NetworkTypePattern pattern =
601 chromeos::onc::NetworkTypePatternFromOncType(type); 601 chromeos::onc::NetworkTypePatternFromOncType(type);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // Eventually the caller (e.g. Settings) should handle any failures and 665 // Eventually the caller (e.g. Settings) should handle any failures and
666 // show its own configuration UI. crbug.com/380937. 666 // show its own configuration UI. crbug.com/380937.
667 if (ui_delegate()->HandleConnectFailed(guid, error_name)) { 667 if (ui_delegate()->HandleConnectFailed(guid, error_name)) {
668 success_callback.Run(); 668 success_callback.Run();
669 return; 669 return;
670 } 670 }
671 failure_callback.Run(error_name); 671 failure_callback.Run(error_name);
672 } 672 }
673 673
674 } // namespace extensions 674 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/hid/hid_device_manager.cc ('k') | extensions/browser/api/socket/app_firewall_hole_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698