network_notification_thread_mac.h 790 B

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