| OLD | NEW |
| 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_LOCATION_H_ | 5 #ifndef BASE_LOCATION_H_ |
| 6 #define BASE_LOCATION_H_ | 6 #define BASE_LOCATION_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <cassert> | 10 #include <cassert> |
| 9 #include <string> | 11 #include <string> |
| 10 | 12 |
| 11 #include "base/base_export.h" | 13 #include "base/base_export.h" |
| 12 #include "base/basictypes.h" | |
| 13 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 14 | 15 |
| 15 namespace tracked_objects { | 16 namespace tracked_objects { |
| 16 | 17 |
| 17 // Location provides basic info where of an object was constructed, or was | 18 // Location provides basic info where of an object was constructed, or was |
| 18 // significantly brought to life. | 19 // significantly brought to life. |
| 19 class BASE_EXPORT Location { | 20 class BASE_EXPORT Location { |
| 20 public: | 21 public: |
| 21 // Constructor should be called with a long-lived char*, such as __FILE__. | 22 // Constructor should be called with a long-lived char*, such as __FILE__. |
| 22 // It assumes the provided value will persist as a global constant, and it | 23 // It assumes the provided value will persist as a global constant, and it |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 101 |
| 101 #define FROM_HERE_WITH_EXPLICIT_FUNCTION(function_name) \ | 102 #define FROM_HERE_WITH_EXPLICIT_FUNCTION(function_name) \ |
| 102 ::tracked_objects::Location(function_name, \ | 103 ::tracked_objects::Location(function_name, \ |
| 103 __FILE__, \ | 104 __FILE__, \ |
| 104 __LINE__, \ | 105 __LINE__, \ |
| 105 ::tracked_objects::GetProgramCounter()) | 106 ::tracked_objects::GetProgramCounter()) |
| 106 | 107 |
| 107 } // namespace tracked_objects | 108 } // namespace tracked_objects |
| 108 | 109 |
| 109 #endif // BASE_LOCATION_H_ | 110 #endif // BASE_LOCATION_H_ |
| OLD | NEW |