| 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 #include "base/debug/trace_event.h" | 5 #include "base/debug/trace_event.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include "base/debug/trace_event_win.h" | 10 #include "base/debug/trace_event_win.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 TraceLog::TraceLog() | 274 TraceLog::TraceLog() |
| 275 : enabled_(false) { | 275 : enabled_(false) { |
| 276 } | 276 } |
| 277 | 277 |
| 278 TraceLog::~TraceLog() { | 278 TraceLog::~TraceLog() { |
| 279 } | 279 } |
| 280 | 280 |
| 281 const TraceCategory* TraceLog::GetCategory(const char* name) { | 281 const TraceCategory* TraceLog::GetCategory(const char* name) { |
| 282 TraceLog* tracelog = GetInstance(); | 282 TraceLog* tracelog = GetInstance(); |
| 283 if (!tracelog){ | 283 if (!tracelog){ |
| 284 CHECK(!g_category_already_shutdown->enabled); | 284 DCHECK(!g_category_already_shutdown->enabled); |
| 285 return g_category_already_shutdown; | 285 return g_category_already_shutdown; |
| 286 } | 286 } |
| 287 return tracelog->GetCategoryInternal(name); | 287 return tracelog->GetCategoryInternal(name); |
| 288 } | 288 } |
| 289 | 289 |
| 290 static void EnableMatchingCategory(int category_index, | 290 static void EnableMatchingCategory(int category_index, |
| 291 const std::vector<std::string>& patterns, | 291 const std::vector<std::string>& patterns, |
| 292 bool is_included) { | 292 bool is_included) { |
| 293 std::vector<std::string>::const_iterator ci = patterns.begin(); | 293 std::vector<std::string>::const_iterator ci = patterns.begin(); |
| 294 bool is_match = false; | 294 bool is_match = false; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 NULL, 0, NULL, 0, | 610 NULL, 0, NULL, 0, |
| 611 p_data_->threshold_begin_id, p_data_->threshold, | 611 p_data_->threshold_begin_id, p_data_->threshold, |
| 612 TraceLog::EVENT_FLAG_NONE); | 612 TraceLog::EVENT_FLAG_NONE); |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 | 615 |
| 616 } // namespace internal | 616 } // namespace internal |
| 617 | 617 |
| 618 } // namespace debug | 618 } // namespace debug |
| 619 } // namespace base | 619 } // namespace base |
| OLD | NEW |