Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 | 53 |
| 54 std::string ToString() const; | 54 std::string ToString() const; |
| 55 | 55 |
| 56 void Write(bool display_filename, bool display_function_name, | 56 void Write(bool display_filename, bool display_function_name, |
| 57 std::string* output) const; | 57 std::string* output) const; |
| 58 | 58 |
| 59 // Write function_name_ in HTML with '<' and '>' properly encoded. | 59 // Write function_name_ in HTML with '<' and '>' properly encoded. |
| 60 void WriteFunctionName(std::string* output) const; | 60 void WriteFunctionName(std::string* output) const; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 const char* const function_name_; | 63 const char* function_name_; |
| 64 const char* const file_name_; | 64 const char* file_name_; |
| 65 const int line_number_; | 65 int line_number_; |
| 66 const void* const program_counter_; | 66 const void* program_counter_; |
|
jbates
2011/09/29 22:59:36
This change is still require to store a Location i
| |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 BASE_EXPORT const void* GetProgramCounter(); | 69 BASE_EXPORT const void* GetProgramCounter(); |
| 70 | 70 |
| 71 // Define a macro to record the current source location. | 71 // Define a macro to record the current source location. |
| 72 #define FROM_HERE tracked_objects::Location( \ | 72 #define FROM_HERE tracked_objects::Location( \ |
| 73 __FUNCTION__, \ | 73 __FUNCTION__, \ |
| 74 __FILE__, \ | 74 __FILE__, \ |
| 75 __LINE__, \ | 75 __LINE__, \ |
| 76 tracked_objects::GetProgramCounter()) \ | 76 tracked_objects::GetProgramCounter()) \ |
| 77 | 77 |
| 78 } // namespace tracked_objects | 78 } // namespace tracked_objects |
| 79 | 79 |
| 80 #endif // BASE_LOCATION_H_ | 80 #endif // BASE_LOCATION_H_ |
| OLD | NEW |