1 // Copyright 2019 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef NET_BASE_NETWORK_NOTIFICATION_THREAD_MAC_H_ 6 #define NET_BASE_NETWORK_NOTIFICATION_THREAD_MAC_H_ 7 8 #include "base/task/single_thread_task_runner.h" 9 10 namespace net { 11 12 // Returns a TaskRunner that runs on a TYPE_UI thread, for macOS notification 13 // APIs that require a CFRunLoop. The thread is not joined on shutdown (like 14 // TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN), so any users of this thread 15 // must take care not to access invalid objects during shutdown. 16 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkNotificationThreadMac(); 17 18 } // namespace net 19 20 #endif // NET_BASE_NETWORK_NOTIFICATION_THREAD_MAC_H_ 21