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

Side by Side Diff: extensions/browser/api/networking_private/networking_private_service_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_service_c lient.h" 5 #include "extensions/browser/api/networking_private/networking_private_service_c lient.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 NetworkingPrivateServiceClient::GetDeviceStateList() { 346 NetworkingPrivateServiceClient::GetDeviceStateList() {
347 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList); 347 std::unique_ptr<DeviceStateList> device_state_list(new DeviceStateList);
348 std::unique_ptr<api::networking_private::DeviceStateProperties> properties( 348 std::unique_ptr<api::networking_private::DeviceStateProperties> properties(
349 new api::networking_private::DeviceStateProperties); 349 new api::networking_private::DeviceStateProperties);
350 properties->type = api::networking_private::NETWORK_TYPE_WIFI; 350 properties->type = api::networking_private::NETWORK_TYPE_WIFI;
351 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; 351 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED;
352 device_state_list->push_back(std::move(properties)); 352 device_state_list->push_back(std::move(properties));
353 return device_state_list; 353 return device_state_list;
354 } 354 }
355 355
356 std::unique_ptr<base::DictionaryValue>
357 NetworkingPrivateServiceClient::GetGlobalPolicy() {
358 return base::MakeUnique<base::DictionaryValue>();
359 }
360
356 bool NetworkingPrivateServiceClient::EnableNetworkType( 361 bool NetworkingPrivateServiceClient::EnableNetworkType(
357 const std::string& type) { 362 const std::string& type) {
358 return false; 363 return false;
359 } 364 }
360 365
361 bool NetworkingPrivateServiceClient::DisableNetworkType( 366 bool NetworkingPrivateServiceClient::DisableNetworkType(
362 const std::string& type) { 367 const std::string& type) {
363 return false; 368 return false;
364 } 369 }
365 370
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 473 }
469 474
470 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( 475 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread(
471 const std::vector<std::string>& network_guids) { 476 const std::vector<std::string>& network_guids) {
472 DCHECK_CURRENTLY_ON(BrowserThread::UI); 477 DCHECK_CURRENTLY_ON(BrowserThread::UI);
473 for (auto& observer : network_events_observers_) 478 for (auto& observer : network_events_observers_)
474 observer.OnNetworkListChangedEvent(network_guids); 479 observer.OnNetworkListChangedEvent(network_guids);
475 } 480 }
476 481
477 } // namespace extensions 482 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698