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

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

Issue 1059033002: Implement networkingPrivate.getDeviceStates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 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 "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/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 void NetworkingPrivateLinux::GetCaptivePortalStatus( 551 void NetworkingPrivateLinux::GetCaptivePortalStatus(
552 const std::string& guid, 552 const std::string& guid,
553 const StringCallback& success_callback, 553 const StringCallback& success_callback,
554 const FailureCallback& failure_callback) { 554 const FailureCallback& failure_callback) {
555 ReportNotSupported("GetCaptivePortalStatus", failure_callback); 555 ReportNotSupported("GetCaptivePortalStatus", failure_callback);
556 } 556 }
557 557
558 scoped_ptr<base::ListValue> NetworkingPrivateLinux::GetEnabledNetworkTypes() { 558 scoped_ptr<base::ListValue> NetworkingPrivateLinux::GetEnabledNetworkTypes() {
559 scoped_ptr<base::ListValue> network_list(new base::ListValue); 559 scoped_ptr<base::ListValue> network_list(new base::ListValue);
560 network_list->AppendString(::onc::network_type::kWiFi);
560 return network_list.Pass(); 561 return network_list.Pass();
561 } 562 }
562 563
564 scoped_ptr<DeviceStateMap> NetworkingPrivateLinux::GetDeviceStates() {
565 scoped_ptr<DeviceStateMap> device_list(new DeviceStateMap);
566 device_list[ ::onc::network_type::kWiFi] = ::onc::device_state::kEnabled;
567 return device_list.Pass();
568 }
569
563 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { 570 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) {
564 return false; 571 return false;
565 } 572 }
566 573
567 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { 574 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) {
568 return false; 575 return false;
569 } 576 }
570 577
571 bool NetworkingPrivateLinux::RequestScan() { 578 bool NetworkingPrivateLinux::RequestScan() {
572 return GetNetworksForScanRequest(); 579 return GetNetworksForScanRequest();
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 base::Unretained(this), base::Passed(&guid_list))); 1174 base::Unretained(this), base::Passed(&guid_list)));
1168 } 1175 }
1169 1176
1170 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1177 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1171 scoped_ptr<GuidList> guid_list) { 1178 scoped_ptr<GuidList> guid_list) {
1172 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1179 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1173 OnNetworksChangedEventOnUIThread(*guid_list); 1180 OnNetworksChangedEventOnUIThread(*guid_list);
1174 } 1181 }
1175 1182
1176 } // namespace extensions 1183 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698