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

Side by Side Diff: base/thread_task_runner_handle.h

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/test/trace_event_analyzer.h ('k') | base/threading/non_thread_safe_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 BASE_THREAD_TASK_RUNNER_HANDLE_H_ 5 #ifndef BASE_THREAD_TASK_RUNNER_HANDLE_H_
6 #define BASE_THREAD_TASK_RUNNER_HANDLE_H_ 6 #define BASE_THREAD_TASK_RUNNER_HANDLE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 10
11 namespace base { 11 namespace base {
12 12
13 class SingleThreadTaskRunner; 13 class SingleThreadTaskRunner;
14 14
15 // ThreadTaskRunnerHandle stores a reference to the main task runner 15 // ThreadTaskRunnerHandle stores a reference to the main task runner
16 // for each thread. Not more than one of these objects can be created 16 // for each thread. Not more than one of these objects can be created
17 // per thread. After an instance of this object is created the Get() 17 // per thread. After an instance of this object is created the Get()
18 // function will return the |task_runner| specified in the 18 // function will return the |task_runner| specified in the
19 // constructor. 19 // constructor.
20 class BASE_EXPORT ThreadTaskRunnerHandle { 20 class BASE_EXPORT ThreadTaskRunnerHandle {
21 public: 21 public:
22 // Gets the SingleThreadTaskRunner for the current thread. 22 // Gets the SingleThreadTaskRunner for the current thread.
23 static scoped_refptr<SingleThreadTaskRunner> Get(); 23 static scoped_refptr<SingleThreadTaskRunner> Get();
24 24
25 ThreadTaskRunnerHandle( 25 explicit ThreadTaskRunnerHandle(
26 const scoped_refptr<SingleThreadTaskRunner>& task_runner); 26 const scoped_refptr<SingleThreadTaskRunner>& task_runner);
27 ~ThreadTaskRunnerHandle(); 27 ~ThreadTaskRunnerHandle();
28 28
29 private: 29 private:
30 scoped_refptr<SingleThreadTaskRunner> task_runner_; 30 scoped_refptr<SingleThreadTaskRunner> task_runner_;
31 }; 31 };
32 32
33 } // namespace base 33 } // namespace base
34 34
35 #endif // BASE_THREAD_TASK_RUNNER_HANDLE_H_ 35 #endif // BASE_THREAD_TASK_RUNNER_HANDLE_H_
OLDNEW
« no previous file with comments | « base/test/trace_event_analyzer.h ('k') | base/threading/non_thread_safe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698