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

Side by Side Diff: content/public/child/worker_thread.h

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_
6 #define CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_ 6 #define CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 24 matching lines...) Expand all
35 // that worker's thread. 35 // that worker's thread.
36 static void AddObserver(Observer* observer); 36 static void AddObserver(Observer* observer);
37 static void RemoveObserver(Observer* observer); 37 static void RemoveObserver(Observer* observer);
38 38
39 // Returns the thread ID for the current worker thread, or 0 if this is not a 39 // Returns the thread ID for the current worker thread, or 0 if this is not a
40 // worker thread (for example, the render thread). Worker thread IDs will 40 // worker thread (for example, the render thread). Worker thread IDs will
41 // always be > 0. 41 // always be > 0.
42 static int GetCurrentId(); 42 static int GetCurrentId();
43 43
44 // Posts a task to the worker thread with ID |id|. ID must be > 0. 44 // Posts a task to the worker thread with ID |id|. ID must be > 0.
45 static void PostTask(int id, base::Closure task); 45 static void PostTask(int id, base::OnceClosure task);
46 46
47 private: 47 private:
48 WorkerThread(){}; 48 WorkerThread(){};
49 DISALLOW_COPY_AND_ASSIGN(WorkerThread); 49 DISALLOW_COPY_AND_ASSIGN(WorkerThread);
50 }; 50 };
51 51
52 } // namespace content 52 } // namespace content
53 53
54 #endif // CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_ 54 #endif // CONTENT_PUBLIC_CHILD_WORKER_THREAD_H_
OLDNEW
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/renderer/categorized_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698