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

Unified Diff: base/thread_task_runner_handle.h

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc ('k') | base/thread_task_runner_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/thread_task_runner_handle.h
diff --git a/base/thread_task_runner_handle.h b/base/thread_task_runner_handle.h
deleted file mode 100644
index 238435f978e167a251c77e7e38eed7c2390d6971..0000000000000000000000000000000000000000
--- a/base/thread_task_runner_handle.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BASE_THREAD_TASK_RUNNER_HANDLE_H_
-#define BASE_THREAD_TASK_RUNNER_HANDLE_H_
-
-#include "base/base_export.h"
-#include "base/memory/ref_counted.h"
-
-namespace base {
-
-class SingleThreadTaskRunner;
-
-// ThreadTaskRunnerHandle stores a reference to a thread's TaskRunner
-// in thread-local storage. Callers can then retrieve the TaskRunner
-// for the current thread by calling ThreadTaskRunnerHandle::Get().
-// At most one TaskRunner may be bound to each thread at a time.
-class BASE_EXPORT ThreadTaskRunnerHandle {
- public:
- // Gets the SingleThreadTaskRunner for the current thread.
- static scoped_refptr<SingleThreadTaskRunner> Get();
-
- // Returns true if the SingleThreadTaskRunner is already created for
- // the current thread.
- static bool IsSet();
-
- // Binds |task_runner| to the current thread. |task_runner| must belong
- // to the current thread for this to succeed.
- explicit ThreadTaskRunnerHandle(
- const scoped_refptr<SingleThreadTaskRunner>& task_runner);
- ~ThreadTaskRunnerHandle();
-
- private:
- scoped_refptr<SingleThreadTaskRunner> task_runner_;
-};
-
-} // namespace base
-
-#endif // BASE_THREAD_TASK_RUNNER_HANDLE_H_
« no previous file with comments | « base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc ('k') | base/thread_task_runner_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698