diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/extensions/browser/api/sockets_udp | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/extensions/browser/api/sockets_udp')
-rw-r--r-- | chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc | 10 | ||||
-rw-r--r-- | chromium/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc b/chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc index 2c17cbe5308..2c7ca4a6503 100644 --- a/chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc +++ b/chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc @@ -142,7 +142,7 @@ void SocketsUdpUpdateFunction::Work() { } SocketsUdpSetPausedFunction::SocketsUdpSetPausedFunction() - : socket_event_dispatcher_(NULL) {} + : socket_event_dispatcher_(nullptr) {} SocketsUdpSetPausedFunction::~SocketsUdpSetPausedFunction() {} @@ -156,7 +156,7 @@ bool SocketsUdpSetPausedFunction::Prepare() { "If this assertion is failing during a test, then it is likely that " "TestExtensionSystem is failing to provide an instance of " "UDPSocketEventDispatcher."; - return socket_event_dispatcher_ != NULL; + return !!socket_event_dispatcher_; } void SocketsUdpSetPausedFunction::Work() { @@ -178,7 +178,7 @@ void SocketsUdpSetPausedFunction::Work() { } SocketsUdpBindFunction::SocketsUdpBindFunction() - : socket_event_dispatcher_(NULL) {} + : socket_event_dispatcher_(nullptr) {} SocketsUdpBindFunction::~SocketsUdpBindFunction() {} @@ -192,7 +192,7 @@ bool SocketsUdpBindFunction::Prepare() { "If this assertion is failing during a test, then it is likely that " "TestExtensionSystem is failing to provide an instance of " "UDPSocketEventDispatcher."; - return socket_event_dispatcher_ != NULL; + return !!socket_event_dispatcher_; } void SocketsUdpBindFunction::AsyncWorkStart() { @@ -363,7 +363,7 @@ bool SocketsUdpGetSocketsFunction::Prepare() { return true; } void SocketsUdpGetSocketsFunction::Work() { std::vector<sockets_udp::SocketInfo> socket_infos; std::unordered_set<int>* resource_ids = GetSocketIds(); - if (resource_ids != NULL) { + if (resource_ids) { for (int socket_id : *resource_ids) { ResumableUDPSocket* socket = GetUdpSocket(socket_id); if (socket) { diff --git a/chromium/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc b/chromium/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc index 14774d2cf85..a1fd9f34e15 100644 --- a/chromium/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc +++ b/chromium/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc @@ -171,8 +171,8 @@ void UDPSocketEventDispatcher::PostEvent(const ReceiveParams& params, std::unique_ptr<Event> event) { DCHECK_CURRENTLY_ON(params.thread_id); - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::BindOnce(&DispatchEvent, params.browser_context_id, + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&DispatchEvent, params.browser_context_id, params.extension_id, std::move(event))); } |