原创 ScopedGDIObject

  template<class T> class ScopedGDIObject {  public:   ScopedGDIObject() : object_(NULL) {}   explicit ScopedGDIObject(

原创 ScopedVariant

class ScopedVariant {  public:   // Declaration of a global variant variable that's always VT_EMPTY   static const VAR

原创 scoped_array

template <class C> class scoped_array {  public:     // The element type   typedef C element_type;     // Constructor.

原创 ScopedHandle

class ScopedHandle {  public:   ScopedHandle() : handle_(NULL) {   }     explicit ScopedHandle(HANDLE h) : handle_(NUL

原创 ScopedHDC

class ScopedHDC {  public:   ScopedHDC() : hdc_(NULL) { }   explicit ScopedHDC(HDC h) : hdc_(h) { }     ~ScopedHDC() {

原创 RefCounted

class RefCountedBase {  protected:   RefCountedBase();   ~RefCountedBase();     void AddRef();     // Returns true if

原创 RefCountedThreadSafe

class RefCountedThreadSafeBase {  protected:   RefCountedThreadSafeBase();   ~RefCountedThreadSafeBase();     void Add

原创 SpinWait

  #define SPIN_FOR_1_SECOND_OR_UNTIL_TRUE(expression) /     SPIN_FOR_TIMEDELTA_OR_UNTIL_TRUE(base::TimeDelta::FromSecon

原创 Singleton

  // Default traits for Singleton<Type>. Calls operator new and operator delete on // the object. Registers automatic d

原创 SharedMemory

// SharedMemoryHandle is a platform specific type which represents // the underlying OS handle to a shared memory segm

原创 Thread

class Thread : PlatformThread::Delegate {  public:   struct Options {     // Specifies the type of message loop that w

原创 ThreadLocalStorage

class ThreadLocalStorage {  public:     // Prototype for the TLS destructor function, which can be optionally used to

原创 ThreadLocal

// Helper functions that abstract the cross-platform APIs.  Do not use directly. struct ThreadLocalPlatform { #if defi

原创 StringPiece

class StringPiece {  public:   typedef size_t size_type;    private:   const char*   ptr_;   size_type     length_;  

原创 Time

class TimeDelta {  public:   TimeDelta() : delta_(0) {   }     // Converts units of time to TimeDeltas.   static TimeD