diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 19:00:20 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 19:00:20 +0000 |
commit | f5661ca939b76182990a5f2e75e0282cc4022546 (patch) | |
tree | 065709f6ae7b3e5c93db6043a43ef92d1059bb2b /base/threading | |
parent | 669a674860fa52bb5ed97e056b3ecd60ea246e74 (diff) | |
download | chromium_src-f5661ca939b76182990a5f2e75e0282cc4022546.zip chromium_src-f5661ca939b76182990a5f2e75e0282cc4022546.tar.gz chromium_src-f5661ca939b76182990a5f2e75e0282cc4022546.tar.bz2 |
Base: A few more files using BASE_API (for base.dll)
BUG=76996
TEST=none
Review URL: http://codereview.chromium.org/6729002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r-- | base/threading/platform_thread.h | 7 | ||||
-rw-r--r-- | base/threading/simple_thread.h | 12 | ||||
-rw-r--r-- | base/threading/thread_collision_warner.h | 11 | ||||
-rw-r--r-- | base/threading/thread_local_storage.h | 7 | ||||
-rw-r--r-- | base/threading/thread_restrictions.h | 9 |
5 files changed, 26 insertions, 20 deletions
diff --git a/base/threading/platform_thread.h b/base/threading/platform_thread.h index 0a3c75d7..40d445f 100644 --- a/base/threading/platform_thread.h +++ b/base/threading/platform_thread.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -10,6 +10,7 @@ #define BASE_THREADING_PLATFORM_THREAD_H_ #pragma once +#include "base/base_api.h" #include "base/basictypes.h" #include "build/build_config.h" @@ -47,11 +48,11 @@ typedef pid_t PlatformThreadId; const PlatformThreadId kInvalidThreadId = 0; // A namespace for low-level thread functions. -class PlatformThread { +class BASE_API PlatformThread { public: // Implement this interface to run code on a background thread. Your // ThreadMain method will be called on the newly created thread. - class Delegate { + class BASE_API Delegate { public: virtual ~Delegate() {} virtual void ThreadMain() = 0; diff --git a/base/threading/simple_thread.h b/base/threading/simple_thread.h index 1631336..f1b644b 100644 --- a/base/threading/simple_thread.h +++ b/base/threading/simple_thread.h @@ -45,6 +45,7 @@ #include <queue> #include <vector> +#include "base/base_api.h" #include "base/basictypes.h" #include "base/threading/platform_thread.h" #include "base/synchronization/lock.h" @@ -54,9 +55,9 @@ namespace base { // This is the base SimpleThread. You can derive from it and implement the // virtual Run method, or you can use the DelegateSimpleThread interface. -class SimpleThread : public PlatformThread::Delegate { +class BASE_API SimpleThread : public PlatformThread::Delegate { public: - class Options { + class BASE_API Options { public: Options() : stack_size_(0) { } ~Options() { } @@ -113,9 +114,9 @@ class SimpleThread : public PlatformThread::Delegate { bool joined_; // True if Join has been called. }; -class DelegateSimpleThread : public SimpleThread { +class BASE_API DelegateSimpleThread : public SimpleThread { public: - class Delegate { + class BASE_API Delegate { public: Delegate() { } virtual ~Delegate() { } @@ -143,7 +144,8 @@ class DelegateSimpleThread : public SimpleThread { // JoinAll() will make sure that all outstanding work is processed, and wait // for everything to finish. You can reuse a pool, so you can call Start() // again after you've called JoinAll(). -class DelegateSimpleThreadPool : public DelegateSimpleThread::Delegate { +class BASE_API DelegateSimpleThreadPool + : public DelegateSimpleThread::Delegate { public: typedef DelegateSimpleThread::Delegate Delegate; diff --git a/base/threading/thread_collision_warner.h b/base/threading/thread_collision_warner.h index 17ed5a4..38294a3 100644 --- a/base/threading/thread_collision_warner.h +++ b/base/threading/thread_collision_warner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -8,6 +8,7 @@ #include <memory> +#include "base/base_api.h" #include "base/atomicops.h" // A helper class alongside macros to be used to verify assumptions about thread @@ -140,7 +141,7 @@ struct DCheckAsserter : public AsserterBase { virtual void warn(); }; -class ThreadCollisionWarner { +class BASE_API ThreadCollisionWarner { public: // The parameter asserter is there only for test purpose ThreadCollisionWarner(AsserterBase* asserter = new DCheckAsserter()) @@ -157,7 +158,7 @@ class ThreadCollisionWarner { // it doesn't leave the critical section, as opposed to ScopedCheck, // because the critical section being pinned is allowed to be used only // from one thread - class Check { + class BASE_API Check { public: explicit Check(ThreadCollisionWarner* warner) : warner_(warner) { @@ -174,7 +175,7 @@ class ThreadCollisionWarner { // This class is meant to be used through the macro // DFAKE_SCOPED_LOCK - class ScopedCheck { + class BASE_API ScopedCheck { public: explicit ScopedCheck(ThreadCollisionWarner* warner) : warner_(warner) { @@ -193,7 +194,7 @@ class ThreadCollisionWarner { // This class is meant to be used through the macro // DFAKE_SCOPED_RECURSIVE_LOCK - class ScopedRecursiveCheck { + class BASE_API ScopedRecursiveCheck { public: explicit ScopedRecursiveCheck(ThreadCollisionWarner* warner) : warner_(warner) { diff --git a/base/threading/thread_local_storage.h b/base/threading/thread_local_storage.h index 204b6530..f882729 100644 --- a/base/threading/thread_local_storage.h +++ b/base/threading/thread_local_storage.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -6,6 +6,7 @@ #define BASE_THREADING_THREAD_LOCAL_STORAGE_H_ #pragma once +#include "base/base_api.h" #include "base/basictypes.h" #if defined(OS_POSIX) @@ -16,7 +17,7 @@ namespace base { // Wrapper for thread local storage. This class doesn't do much except provide // an API for portability. -class ThreadLocalStorage { +class BASE_API ThreadLocalStorage { public: // Prototype for the TLS destructor function, which can be optionally used to @@ -25,7 +26,7 @@ class ThreadLocalStorage { typedef void (*TLSDestructorFunc)(void* value); // A key representing one value stored in TLS. - class Slot { + class BASE_API Slot { public: explicit Slot(TLSDestructorFunc destructor = NULL); diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index de8174f..98e0422 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -1,10 +1,11 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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_THREADING_THREAD_RESTRICTIONS_H_ #define BASE_THREADING_THREAD_RESTRICTIONS_H_ +#include "base/base_api.h" #include "base/basictypes.h" namespace base { @@ -35,11 +36,11 @@ namespace base { // only calls other functions in Chrome and not fopen(), you should go // add the AssertIOAllowed checks in the helper functions. -class ThreadRestrictions { +class BASE_API ThreadRestrictions { public: // Constructing a ScopedAllowIO temporarily allows IO for the current // thread. Doing this is almost certainly always incorrect. - class ScopedAllowIO { + class BASE_API ScopedAllowIO { public: ScopedAllowIO() { previous_value_ = SetIOAllowed(true); } ~ScopedAllowIO() { SetIOAllowed(previous_value_); } @@ -52,7 +53,7 @@ class ThreadRestrictions { // Constructing a ScopedAllowSingleton temporarily allows accessing for the // current thread. Doing this is almost always incorrect. - class ScopedAllowSingleton { + class BASE_API ScopedAllowSingleton { public: ScopedAllowSingleton() { previous_value_ = SetSingletonAllowed(true); } ~ScopedAllowSingleton() { SetSingletonAllowed(previous_value_); } |