Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: base/location.h

Issue 7778033: Add trace code to track all posted tasks in message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trace_event.h formatting fix Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | base/memory/singleton.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_;
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_
OLDNEW
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | base/memory/singleton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698