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 #include "base/debug/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 } | 856 } |
857 #if defined(OS_ANDROID) | 857 #if defined(OS_ANDROID) |
858 ApplyATraceEnabledFlag(category_group_enabled); | 858 ApplyATraceEnabledFlag(category_group_enabled); |
859 #endif | 859 #endif |
860 return category_group_enabled; | 860 return category_group_enabled; |
861 } | 861 } |
862 | 862 |
863 void TraceLog::GetKnownCategoryGroups( | 863 void TraceLog::GetKnownCategoryGroups( |
864 std::vector<std::string>* category_groups) { | 864 std::vector<std::string>* category_groups) { |
865 AutoLock lock(lock_); | 865 AutoLock lock(lock_); |
866 for (int i = 0; i < g_category_index; i++) | 866 for (int i = g_num_builtin_categories; i < g_category_index; i++) |
867 category_groups->push_back(g_category_groups[i]); | 867 category_groups->push_back(g_category_groups[i]); |
868 } | 868 } |
869 | 869 |
870 void TraceLog::SetEnabled(const CategoryFilter& category_filter, | 870 void TraceLog::SetEnabled(const CategoryFilter& category_filter, |
871 Options options) { | 871 Options options) { |
872 AutoLock lock(lock_); | 872 AutoLock lock(lock_); |
873 | 873 |
874 if (enable_count_++ > 0) { | 874 if (enable_count_++ > 0) { |
875 if (options != trace_options_) { | 875 if (options != trace_options_) { |
876 DLOG(ERROR) << "Attemting to re-enable tracing with a different " | 876 DLOG(ERROR) << "Attemting to re-enable tracing with a different " |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 NULL, // arg_names | 1421 NULL, // arg_names |
1422 NULL, // arg_types | 1422 NULL, // arg_types |
1423 NULL, // arg_values | 1423 NULL, // arg_values |
1424 NULL, // convertable values | 1424 NULL, // convertable values |
1425 TRACE_EVENT_FLAG_NONE); // flags | 1425 TRACE_EVENT_FLAG_NONE); // flags |
1426 } | 1426 } |
1427 } | 1427 } |
1428 | 1428 |
1429 } // namespace trace_event_internal | 1429 } // namespace trace_event_internal |
1430 | 1430 |
OLD | NEW |