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

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

Issue 2620463003: Add getGlobalPolicy to networkingPrivate API. (Closed)
Patch Set: Add dcheck Created 3 years, 11 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"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ptr_util.h"
12 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
13 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
14 #include "base/strings/string_split.h" 15 #include "base/strings/string_split.h"
15 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/sequenced_worker_pool.h" 17 #include "base/threading/sequenced_worker_pool.h"
17 #include "components/onc/onc_constants.h" 18 #include "components/onc/onc_constants.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 #include "dbus/bus.h" 20 #include "dbus/bus.h"
20 #include "dbus/message.h" 21 #include "dbus/message.h"
21 #include "dbus/object_path.h" 22 #include "dbus/object_path.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 NetworkingPrivateLinux::GetDeviceStateList() { 583 NetworkingPrivateLinux::GetDeviceStateList() {
583 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList); 584 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList);
584 std::unique_ptr<api::networking_private::DeviceStateProperties> properties( 585 std::unique_ptr<api::networking_private::DeviceStateProperties> properties(
585 new api::networking_private::DeviceStateProperties); 586 new api::networking_private::DeviceStateProperties);
586 properties->type = api::networking_private::NETWORK_TYPE_WIFI; 587 properties->type = api::networking_private::NETWORK_TYPE_WIFI;
587 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; 588 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED;
588 device_state_list->push_back(std::move(properties)); 589 device_state_list->push_back(std::move(properties));
589 return device_state_list; 590 return device_state_list;
590 } 591 }
591 592
593 std::unique_ptr<base::DictionaryValue>
594 NetworkingPrivateLinux::GetGlobalPolicy() {
595 return base::MakeUnique<base::DictionaryValue>();
596 }
597
592 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { 598 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) {
593 return false; 599 return false;
594 } 600 }
595 601
596 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { 602 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) {
597 return false; 603 return false;
598 } 604 }
599 605
600 bool NetworkingPrivateLinux::RequestScan() { 606 bool NetworkingPrivateLinux::RequestScan() {
601 return GetNetworksForScanRequest(); 607 return GetNetworksForScanRequest();
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 base::Unretained(this), base::Passed(&guid_list))); 1203 base::Unretained(this), base::Passed(&guid_list)));
1198 } 1204 }
1199 1205
1200 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1206 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1201 std::unique_ptr<GuidList> guid_list) { 1207 std::unique_ptr<GuidList> guid_list) {
1202 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1208 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1203 OnNetworksChangedEventOnUIThread(*guid_list); 1209 OnNetworksChangedEventOnUIThread(*guid_list);
1204 } 1210 }
1205 1211
1206 } // namespace extensions 1212 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698