| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASICTYPES_H_ | 5 #ifndef BASE_BASICTYPES_H_ |
| 6 #define BASE_BASICTYPES_H_ | 6 #define BASE_BASICTYPES_H_ |
| 7 | 7 |
| 8 #include <limits.h> // So we can set the bounds of our types | 8 #include <limits.h> // So we can set the bounds of our types |
| 9 #include <stddef.h> // For size_t | 9 #include <stddef.h> // For size_t |
| 10 #include <string.h> // for memcpy | 10 #include <string.h> // for memcpy |
| 11 | 11 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const int64 kint64min = (( int64) GG_LONGLONG(0x8000000000000000)); | 75 const int64 kint64min = (( int64) GG_LONGLONG(0x8000000000000000)); |
| 76 const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF)); | 76 const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF)); |
| 77 | 77 |
| 78 // A macro to disallow the copy constructor and operator= functions | 78 // A macro to disallow the copy constructor and operator= functions |
| 79 // This should be used in the private: declarations for a class | 79 // This should be used in the private: declarations for a class |
| 80 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ | 80 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| 81 TypeName(const TypeName&); \ | 81 TypeName(const TypeName&); \ |
| 82 void operator=(const TypeName&) | 82 void operator=(const TypeName&) |
| 83 | 83 |
| 84 // An older, deprecated, politically incorrect name for the above. | 84 // An older, deprecated, politically incorrect name for the above. |
| 85 // NOTE: The usage of this macro was baned from our code base, but some |
| 86 // third_party libraries are yet using it. |
| 87 // TODO(tfarina): Figure out how to fix the usage of this macro in the |
| 88 // third_party libraries and get rid of it. |
| 85 #define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName) | 89 #define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName) |
| 86 | 90 |
| 87 // A macro to disallow all the implicit constructors, namely the | 91 // A macro to disallow all the implicit constructors, namely the |
| 88 // default constructor, copy constructor and operator= functions. | 92 // default constructor, copy constructor and operator= functions. |
| 89 // | 93 // |
| 90 // This should be used in the private: declarations for a class | 94 // This should be used in the private: declarations for a class |
| 91 // that wants to prevent anyone from instantiating it. This is | 95 // that wants to prevent anyone from instantiating it. This is |
| 92 // especially useful for classes containing only static methods. | 96 // especially useful for classes containing only static methods. |
| 93 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ | 97 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ |
| 94 TypeName(); \ | 98 TypeName(); \ |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 // constructor declared as | 355 // constructor declared as |
| 352 // explicit MyClass(base::LinkerInitialized x) {} | 356 // explicit MyClass(base::LinkerInitialized x) {} |
| 353 // and invoked as | 357 // and invoked as |
| 354 // static MyClass my_variable_name(base::LINKER_INITIALIZED); | 358 // static MyClass my_variable_name(base::LINKER_INITIALIZED); |
| 355 namespace base { | 359 namespace base { |
| 356 enum LinkerInitialized { LINKER_INITIALIZED }; | 360 enum LinkerInitialized { LINKER_INITIALIZED }; |
| 357 } // base | 361 } // base |
| 358 | 362 |
| 359 | 363 |
| 360 #endif // BASE_BASICTYPES_H_ | 364 #endif // BASE_BASICTYPES_H_ |
| OLD | NEW |