Chromium Code Reviews| Index: base/debug/trace_event_impl.cc |
| diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc |
| index d543d873ac19998b4f8559254d4318d6a2b4482a..fcb3ee2368186a158b8b1a394f4fa1f2f28ef51b 100644 |
| --- a/base/debug/trace_event_impl.cc |
| +++ b/base/debug/trace_event_impl.cc |
| @@ -74,7 +74,8 @@ unsigned char g_category_enabled[TRACE_EVENT_MAX_CATEGORIES] = { 0 }; |
| const int g_category_already_shutdown = 0; |
| const int g_category_categories_exhausted = 1; |
| const int g_category_metadata = 2; |
| -int g_category_index = 3; // skip initial 3 categories |
| +const int g_num_builtin_categories = 3; |
| +int g_category_index = g_num_builtin_categories; // skip default categories. |
|
jar (doing other things)
2013/03/25 19:15:25
nit: Capitalize start of comment sentences.
dsinclair
2013/03/25 19:22:28
Done.
|
| // The name of the current thread. This is used to decide if the current |
| // thread name has changed. We combine all the seen thread names into the |
| @@ -782,7 +783,7 @@ const unsigned char* TraceLog::GetCategoryEnabledInternal(const char* name) { |
| void TraceLog::GetKnownCategories(std::vector<std::string>* categories) { |
| AutoLock lock(lock_); |
| - for (int i = 0; i < g_category_index; i++) |
| + for (int i = g_num_builtin_categories; i < g_category_index; i++) |
| categories->push_back(g_categories[i]); |
| } |