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

Side by Side Diff: base/location.h

Issue 8429009: Enable tracking of objects by default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/base.gypi ('k') | base/message_loop.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"
11 #include "base/values.h" 11 #include "base/values.h"
12 12
13 #ifndef NDEBUG
14 #ifndef TRACK_ALL_TASK_OBJECTS
15 #define TRACK_ALL_TASK_OBJECTS
16 #endif // TRACK_ALL_TASK_OBJECTS
17 #endif // NDEBUG
18
19 namespace tracked_objects { 13 namespace tracked_objects {
20 14
21 // Location provides basic info where of an object was constructed, or was 15 // Location provides basic info where of an object was constructed, or was
22 // significantly brought to life. 16 // significantly brought to life.
23 class BASE_EXPORT Location { 17 class BASE_EXPORT Location {
24 public: 18 public:
25 // Constructor should be called with a long-lived char*, such as __FILE__. 19 // Constructor should be called with a long-lived char*, such as __FILE__.
26 // It assumes the provided value will persist as a global constant, and it 20 // It assumes the provided value will persist as a global constant, and it
27 // will not make a copy of it. 21 // will not make a copy of it.
28 Location(const char* function_name, 22 Location(const char* function_name,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Define a macro to record the current source location. 74 // Define a macro to record the current source location.
81 #define FROM_HERE tracked_objects::Location( \ 75 #define FROM_HERE tracked_objects::Location( \
82 __FUNCTION__, \ 76 __FUNCTION__, \
83 __FILE__, \ 77 __FILE__, \
84 __LINE__, \ 78 __LINE__, \
85 tracked_objects::GetProgramCounter()) \ 79 tracked_objects::GetProgramCounter()) \
86 80
87 } // namespace tracked_objects 81 } // namespace tracked_objects
88 82
89 #endif // BASE_LOCATION_H_ 83 #endif // BASE_LOCATION_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/message_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698