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

Unified Diff: base/simple_thread.h

Issue 3522004: FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to non-POD structs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 3 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 | « no previous file | base/simple_thread.cc » ('j') | net/socket/client_socket_pool_histograms.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/simple_thread.h
diff --git a/base/simple_thread.h b/base/simple_thread.h
index 40e568a5f4f4966802ca0ef3b141241e5b7b4940..13c46c0a2740bdf141ada522f1893e5a7062b4db 100644
--- a/base/simple_thread.h
+++ b/base/simple_thread.h
@@ -74,12 +74,8 @@ class SimpleThread : public PlatformThread::Delegate {
// configuration involving the thread creation and management.
// Every thread has a name, in the form of |name_prefix|/TID, for example
// "my_thread/321". The thread will not be created until Start() is called.
- explicit SimpleThread(const std::string& name_prefix)
- : name_prefix_(name_prefix), name_(name_prefix),
- thread_(), event_(true, false), tid_(0), joined_(false) { }
- SimpleThread(const std::string& name_prefix, const Options& options)
- : name_prefix_(name_prefix), name_(name_prefix), options_(options),
- thread_(), event_(true, false), tid_(0), joined_(false) { }
+ explicit SimpleThread(const std::string& name_prefix);
+ SimpleThread(const std::string& name_prefix, const Options& options);
virtual ~SimpleThread();
@@ -127,14 +123,12 @@ class DelegateSimpleThread : public SimpleThread {
};
DelegateSimpleThread(Delegate* delegate,
- const std::string& name_prefix)
- : SimpleThread(name_prefix), delegate_(delegate) { }
+ const std::string& name_prefix);
DelegateSimpleThread(Delegate* delegate,
const std::string& name_prefix,
- const Options& options)
- : SimpleThread(name_prefix, options), delegate_(delegate) { }
+ const Options& options);
- virtual ~DelegateSimpleThread() { }
+ virtual ~DelegateSimpleThread();
virtual void Run();
private:
Delegate* delegate_;
@@ -153,10 +147,8 @@ class DelegateSimpleThreadPool : public DelegateSimpleThread::Delegate {
public:
typedef DelegateSimpleThread::Delegate Delegate;
- DelegateSimpleThreadPool(const std::string& name_prefix, int num_threads)
- : name_prefix_(name_prefix), num_threads_(num_threads),
- dry_(true, false) { }
- ~DelegateSimpleThreadPool();
+ DelegateSimpleThreadPool(const std::string& name_prefix, int num_threads);
+ virtual ~DelegateSimpleThreadPool();
// Start up all of the underlying threads, and start processing work if we
// have any.
« no previous file with comments | « no previous file | base/simple_thread.cc » ('j') | net/socket/client_socket_pool_histograms.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698