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

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

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 5 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 | « components/test_runner/web_test_proxy.cc ('k') | gin/per_isolate_data.h » ('j') | 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 "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 "base/base64.h" 7 #include "base/base64.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/sequenced_task_runner.h" 9 #include "base/sequenced_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
10 #include "base/threading/worker_pool.h" 11 #include "base/threading/worker_pool.h"
11 #include "components/onc/onc_constants.h" 12 #include "components/onc/onc_constants.h"
12 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
13 #include "extensions/browser/api/networking_private/networking_private_api.h" 14 #include "extensions/browser/api/networking_private/networking_private_api.h"
14 #include "extensions/browser/api/networking_private/networking_private_delegate_ observer.h" 15 #include "extensions/browser/api/networking_private/networking_private_delegate_ observer.h"
15 16
16 using content::BrowserThread; 17 using content::BrowserThread;
17 using wifi::WiFiService; 18 using wifi::WiFiService;
18 19
19 namespace extensions { 20 namespace extensions {
(...skipping 29 matching lines...) Expand all
49 sequence_token_, base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN); 50 sequence_token_, base::SequencedWorkerPool::CONTINUE_ON_SHUTDOWN);
50 task_runner_->PostTask( 51 task_runner_->PostTask(
51 FROM_HERE, 52 FROM_HERE,
52 base::Bind(&WiFiService::Initialize, 53 base::Bind(&WiFiService::Initialize,
53 base::Unretained(wifi_service_.get()), task_runner_)); 54 base::Unretained(wifi_service_.get()), task_runner_));
54 task_runner_->PostTask( 55 task_runner_->PostTask(
55 FROM_HERE, 56 FROM_HERE,
56 base::Bind( 57 base::Bind(
57 &WiFiService::SetEventObservers, 58 &WiFiService::SetEventObservers,
58 base::Unretained(wifi_service_.get()), 59 base::Unretained(wifi_service_.get()),
59 base::MessageLoopProxy::current(), 60 base::ThreadTaskRunnerHandle::Get(),
60 base::Bind( 61 base::Bind(
61 &NetworkingPrivateServiceClient::OnNetworksChangedEventOnUIThread, 62 &NetworkingPrivateServiceClient::OnNetworksChangedEventOnUIThread,
62 weak_factory_.GetWeakPtr()), 63 weak_factory_.GetWeakPtr()),
63 base::Bind(&NetworkingPrivateServiceClient:: 64 base::Bind(&NetworkingPrivateServiceClient::
64 OnNetworkListChangedEventOnUIThread, 65 OnNetworkListChangedEventOnUIThread,
65 weak_factory_.GetWeakPtr()))); 66 weak_factory_.GetWeakPtr())));
66 net::NetworkChangeNotifier::AddNetworkChangeObserver(this); 67 net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
67 } 68 }
68 69
69 NetworkingPrivateServiceClient::~NetworkingPrivateServiceClient() { 70 NetworkingPrivateServiceClient::~NetworkingPrivateServiceClient() {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 446
446 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread( 447 void NetworkingPrivateServiceClient::OnNetworkListChangedEventOnUIThread(
447 const std::vector<std::string>& network_guids) { 448 const std::vector<std::string>& network_guids) {
448 DCHECK_CURRENTLY_ON(BrowserThread::UI); 449 DCHECK_CURRENTLY_ON(BrowserThread::UI);
449 FOR_EACH_OBSERVER(NetworkingPrivateDelegateObserver, 450 FOR_EACH_OBSERVER(NetworkingPrivateDelegateObserver,
450 network_events_observers_, 451 network_events_observers_,
451 OnNetworkListChangedEvent(network_guids)); 452 OnNetworkListChangedEvent(network_guids));
452 } 453 }
453 454
454 } // namespace extensions 455 } // namespace extensions
OLDNEW
« no previous file with comments | « components/test_runner/web_test_proxy.cc ('k') | gin/per_isolate_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698