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

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

Issue 2888053002: Rename TaskRunner::RunsTasksOnCurrentThread() in //extensions, //headless, //mojo (Closed)
Patch Set: rebase Created 3 years, 7 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 | extensions/browser/api/system_storage/storage_info_provider.cc » ('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 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"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 dbus_thread_.task_runner()->PostTask( 143 dbus_thread_.task_runner()->PostTask(
144 FROM_HERE, 144 FROM_HERE,
145 base::Bind(&NetworkingPrivateLinux::Initialize, base::Unretained(this))); 145 base::Bind(&NetworkingPrivateLinux::Initialize, base::Unretained(this)));
146 } 146 }
147 147
148 NetworkingPrivateLinux::~NetworkingPrivateLinux() { 148 NetworkingPrivateLinux::~NetworkingPrivateLinux() {
149 dbus_thread_.Stop(); 149 dbus_thread_.Stop();
150 } 150 }
151 151
152 void NetworkingPrivateLinux::AssertOnDBusThread() { 152 void NetworkingPrivateLinux::AssertOnDBusThread() {
153 DCHECK(dbus_task_runner_->RunsTasksOnCurrentThread()); 153 DCHECK(dbus_task_runner_->RunsTasksInCurrentSequence());
154 } 154 }
155 155
156 void NetworkingPrivateLinux::Initialize() { 156 void NetworkingPrivateLinux::Initialize() {
157 dbus_task_runner_ = dbus_thread_.task_runner(); 157 dbus_task_runner_ = dbus_thread_.task_runner();
158 // This has to be called after the task runner is initialized. 158 // This has to be called after the task runner is initialized.
159 AssertOnDBusThread(); 159 AssertOnDBusThread();
160 160
161 dbus::Bus::Options dbus_options; 161 dbus::Bus::Options dbus_options;
162 dbus_options.bus_type = dbus::Bus::SYSTEM; 162 dbus_options.bus_type = dbus::Bus::SYSTEM;
163 dbus_options.connection_type = dbus::Bus::PRIVATE; 163 dbus_options.connection_type = dbus::Bus::PRIVATE;
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 base::Unretained(this), base::Passed(&guid_list))); 1202 base::Unretained(this), base::Passed(&guid_list)));
1203 } 1203 }
1204 1204
1205 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1205 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1206 std::unique_ptr<GuidList> guid_list) { 1206 std::unique_ptr<GuidList> guid_list) {
1207 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1207 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1208 OnNetworksChangedEventOnUIThread(*guid_list); 1208 OnNetworksChangedEventOnUIThread(*guid_list);
1209 } 1209 }
1210 1210
1211 } // namespace extensions 1211 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/api/system_storage/storage_info_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698