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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 TraceLog::TraceLog() | 315 TraceLog::TraceLog() |
316 : enabled_(false) { | 316 : enabled_(false) { |
317 } | 317 } |
318 | 318 |
319 TraceLog::~TraceLog() { | 319 TraceLog::~TraceLog() { |
320 } | 320 } |
321 | 321 |
322 const TraceCategory* TraceLog::GetCategory(const char* name) { | 322 const TraceCategory* TraceLog::GetCategory(const char* name) { |
323 TraceLog* tracelog = GetInstance(); | 323 TraceLog* tracelog = GetInstance(); |
324 if (!tracelog){ | 324 if (!tracelog){ |
325 CHECK(!g_category_already_shutdown->enabled); | 325 DCHECK(!g_category_already_shutdown->enabled); |
326 return g_category_already_shutdown; | 326 return g_category_already_shutdown; |
327 } | 327 } |
328 return tracelog->GetCategoryInternal(name); | 328 return tracelog->GetCategoryInternal(name); |
329 } | 329 } |
330 | 330 |
331 static void EnableMatchingCategory(int category_index, | 331 static void EnableMatchingCategory(int category_index, |
332 const std::vector<std::string>& patterns, | 332 const std::vector<std::string>& patterns, |
333 bool is_included) { | 333 bool is_included) { |
334 std::vector<std::string>::const_iterator ci = patterns.begin(); | 334 std::vector<std::string>::const_iterator ci = patterns.begin(); |
335 bool is_match = false; | 335 bool is_match = false; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 NULL, 0, NULL, 0, | 651 NULL, 0, NULL, 0, |
652 p_data_->threshold_begin_id, p_data_->threshold, | 652 p_data_->threshold_begin_id, p_data_->threshold, |
653 TraceLog::EVENT_FLAG_NONE); | 653 TraceLog::EVENT_FLAG_NONE); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 } // namespace internal | 657 } // namespace internal |
658 | 658 |
659 } // namespace debug | 659 } // namespace debug |
660 } // namespace base | 660 } // namespace base |
OLD | NEW |