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

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

Issue 2751423004: Move NetworkingPrivateDelegate::CryptoVerify to networking_cast_private (Closed)
Patch Set: blocking pool removed Created 3 years, 9 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 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const NetworkingPrivateDelegate::FailureCallback& failure_callback) { 128 const NetworkingPrivateDelegate::FailureCallback& failure_callback) {
129 if (!error->empty()) { 129 if (!error->empty()) {
130 failure_callback.Run(*error); 130 failure_callback.Run(*error);
131 return; 131 return;
132 } 132 }
133 success_callback.Run(std::move(properties)); 133 success_callback.Run(std::move(properties));
134 } 134 }
135 135
136 } // namespace 136 } // namespace
137 137
138 NetworkingPrivateLinux::NetworkingPrivateLinux( 138 NetworkingPrivateLinux::NetworkingPrivateLinux()
139 std::unique_ptr<VerifyDelegate> verify_delegate) 139 : dbus_thread_("Networking Private DBus"), network_manager_proxy_(NULL) {
140 : NetworkingPrivateDelegate(std::move(verify_delegate)),
141 dbus_thread_("Networking Private DBus"),
142 network_manager_proxy_(NULL) {
143 base::Thread::Options thread_options(base::MessageLoop::Type::TYPE_IO, 0); 140 base::Thread::Options thread_options(base::MessageLoop::Type::TYPE_IO, 0);
144 141
145 dbus_thread_.StartWithOptions(thread_options); 142 dbus_thread_.StartWithOptions(thread_options);
146 dbus_thread_.task_runner()->PostTask( 143 dbus_thread_.task_runner()->PostTask(
147 FROM_HERE, 144 FROM_HERE,
148 base::Bind(&NetworkingPrivateLinux::Initialize, base::Unretained(this))); 145 base::Bind(&NetworkingPrivateLinux::Initialize, base::Unretained(this)));
149 } 146 }
150 147
151 NetworkingPrivateLinux::~NetworkingPrivateLinux() { 148 NetworkingPrivateLinux::~NetworkingPrivateLinux() {
152 dbus_thread_.Stop(); 149 dbus_thread_.Stop();
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 base::Unretained(this), base::Passed(&guid_list))); 1201 base::Unretained(this), base::Passed(&guid_list)));
1205 } 1202 }
1206 1203
1207 void NetworkingPrivateLinux::OnNetworksChangedEventTask( 1204 void NetworkingPrivateLinux::OnNetworksChangedEventTask(
1208 std::unique_ptr<GuidList> guid_list) { 1205 std::unique_ptr<GuidList> guid_list) {
1209 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 1206 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
1210 OnNetworksChangedEventOnUIThread(*guid_list); 1207 OnNetworksChangedEventOnUIThread(*guid_list);
1211 } 1208 }
1212 1209
1213 } // namespace extensions 1210 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698