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

Side by Side Diff: chromeos/network/managed_network_configuration_handler_impl.cc

Issue 2083493004: Remove calls to MessageLoop::current() in chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromeos/network/managed_network_configuration_handler_impl.h" 5 #include "chromeos/network/managed_network_configuration_handler_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/guid.h" 12 #include "base/guid.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/message_loop/message_loop.h"
17 #include "base/single_thread_task_runner.h" 16 #include "base/single_thread_task_runner.h"
18 #include "base/stl_util.h" 17 #include "base/stl_util.h"
19 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
20 #include "base/values.h" 19 #include "base/values.h"
21 #include "chromeos/dbus/shill_manager_client.h" 20 #include "chromeos/dbus/shill_manager_client.h"
22 #include "chromeos/dbus/shill_profile_client.h" 21 #include "chromeos/dbus/shill_profile_client.h"
23 #include "chromeos/dbus/shill_service_client.h" 22 #include "chromeos/dbus/shill_service_client.h"
24 #include "chromeos/network/device_state.h" 23 #include "chromeos/network/device_state.h"
25 #include "chromeos/network/network_configuration_handler.h" 24 #include "chromeos/network/network_configuration_handler.h"
26 #include "chromeos/network/network_device_handler.h" 25 #include "chromeos/network/network_device_handler.h"
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 profile.userhash.empty()); 700 profile.userhash.empty());
702 return GetPoliciesForUser(profile.userhash); 701 return GetPoliciesForUser(profile.userhash);
703 } 702 }
704 703
705 ManagedNetworkConfigurationHandlerImpl::ManagedNetworkConfigurationHandlerImpl() 704 ManagedNetworkConfigurationHandlerImpl::ManagedNetworkConfigurationHandlerImpl()
706 : network_state_handler_(NULL), 705 : network_state_handler_(NULL),
707 network_profile_handler_(NULL), 706 network_profile_handler_(NULL),
708 network_configuration_handler_(NULL), 707 network_configuration_handler_(NULL),
709 network_device_handler_(NULL), 708 network_device_handler_(NULL),
710 weak_ptr_factory_(this) { 709 weak_ptr_factory_(this) {
711 CHECK(base::MessageLoop::current()); 710 CHECK(base::ThreadTaskRunnerHandle::IsSet());
712 } 711 }
713 712
714 ManagedNetworkConfigurationHandlerImpl:: 713 ManagedNetworkConfigurationHandlerImpl::
715 ~ManagedNetworkConfigurationHandlerImpl() { 714 ~ManagedNetworkConfigurationHandlerImpl() {
716 if (network_profile_handler_) 715 if (network_profile_handler_)
717 network_profile_handler_->RemoveObserver(this); 716 network_profile_handler_->RemoveObserver(this);
718 } 717 }
719 718
720 void ManagedNetworkConfigurationHandlerImpl::Init( 719 void ManagedNetworkConfigurationHandlerImpl::Init(
721 NetworkStateHandler* network_state_handler, 720 NetworkStateHandler* network_state_handler,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 std::unique_ptr<base::DictionaryValue> network_properties, 857 std::unique_ptr<base::DictionaryValue> network_properties,
859 GetDevicePropertiesCallback send_callback, 858 GetDevicePropertiesCallback send_callback,
860 const std::string& error_name, 859 const std::string& error_name,
861 std::unique_ptr<base::DictionaryValue> error_data) { 860 std::unique_ptr<base::DictionaryValue> error_data) {
862 NET_LOG_ERROR("Error getting device properties", service_path); 861 NET_LOG_ERROR("Error getting device properties", service_path);
863 send_callback.Run(service_path, std::move(network_properties)); 862 send_callback.Run(service_path, std::move(network_properties));
864 } 863 }
865 864
866 865
867 } // namespace chromeos 866 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698