summaryrefslogtreecommitdiffstats
path: root/components/wifi/wifi_service_mac.mm
diff options
context:
space:
mode:
authorskyostil <skyostil@chromium.org>2015-06-02 12:03:48 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 19:05:11 +0000
commitb0daa011ba68aa9079f31925faa9a7ca88894770 (patch)
tree8fb2c57a520058df58dba9ba34906af098f715f3 /components/wifi/wifi_service_mac.mm
parent3f2a3abd4acdd336e4c76ce963663507bd05e7bd (diff)
downloadchromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.zip
chromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.tar.gz
chromium_src-b0daa011ba68aa9079f31925faa9a7ca88894770.tar.bz2
components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs
This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 Review URL: https://codereview.chromium.org/1144153004 Cr-Commit-Position: refs/heads/master@{#332440}
Diffstat (limited to 'components/wifi/wifi_service_mac.mm')
-rw-r--r--components/wifi/wifi_service_mac.mm20
1 files changed, 9 insertions, 11 deletions
diff --git a/components/wifi/wifi_service_mac.mm b/components/wifi/wifi_service_mac.mm
index 1e18226..3c9d8a7 100644
--- a/components/wifi/wifi_service_mac.mm
+++ b/components/wifi/wifi_service_mac.mm
@@ -71,7 +71,7 @@ class WiFiServiceMac : public WiFiService {
std::string* error) override;
void SetEventObservers(
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const NetworkGuidListCallback& networks_changed_observer,
const NetworkGuidListCallback& network_list_changed_observer) override;
@@ -140,8 +140,8 @@ class WiFiServiceMac : public WiFiService {
NetworkGuidListCallback networks_changed_observer_;
// Observer to get notified when network list has changed.
NetworkGuidListCallback network_list_changed_observer_;
- // MessageLoopProxy to which events should be posted.
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
+ // Task runner to which events should be posted.
+ scoped_refptr<base::SingleThreadTaskRunner> event_task_runner_;
// Task runner for worker tasks.
scoped_refptr<base::SequencedTaskRunner> task_runner_;
// Cached list of visible networks. Updated by |UpdateNetworks|.
@@ -384,10 +384,10 @@ void WiFiServiceMac::GetKeyFromSystem(const std::string& network_guid,
}
void WiFiServiceMac::SetEventObservers(
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const NetworkGuidListCallback& networks_changed_observer,
const NetworkGuidListCallback& network_list_changed_observer) {
- message_loop_proxy_.swap(message_loop_proxy);
+ event_task_runner_.swap(task_runner);
networks_changed_observer_ = networks_changed_observer;
network_list_changed_observer_ = network_list_changed_observer;
@@ -642,9 +642,8 @@ void WiFiServiceMac::NotifyNetworkListChanged(const NetworkList& networks) {
current_networks.push_back(it->guid);
}
- message_loop_proxy_->PostTask(
- FROM_HERE,
- base::Bind(network_list_changed_observer_, current_networks));
+ event_task_runner_->PostTask(
+ FROM_HERE, base::Bind(network_list_changed_observer_, current_networks));
}
void WiFiServiceMac::NotifyNetworkChanged(const std::string& network_guid) {
@@ -653,9 +652,8 @@ void WiFiServiceMac::NotifyNetworkChanged(const std::string& network_guid) {
DVLOG(1) << "NotifyNetworkChanged: " << network_guid;
NetworkGuidList changed_networks(1, network_guid);
- message_loop_proxy_->PostTask(
- FROM_HERE,
- base::Bind(networks_changed_observer_, changed_networks));
+ event_task_runner_->PostTask(
+ FROM_HERE, base::Bind(networks_changed_observer_, changed_networks));
}
// static