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

Unified Diff: base/debug/trace_event_impl.cc

Issue 9213013: Split up trace_event.h into trace_event_impl.h and add webkitplatform support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event.cc b/base/debug/trace_event_impl.cc
similarity index 94%
copy from base/debug/trace_event.cc
copy to base/debug/trace_event_impl.cc
index c5547697ee822920492f7ef7f1cf0e50b7f9843c..26e51f483fa4c692f71d1a6a1d73e66d2e4b986d 100644
--- a/base/debug/trace_event.cc
+++ b/base/debug/trace_event_impl.cc
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/debug/trace_event.h"
+#include "base/debug/trace_event_impl.h"
#include <algorithm>
#include "base/bind.h"
+#include "base/debug/trace_event.h"
#include "base/file_util.h"
#include "base/format_macros.h"
#include "base/lazy_instance.h"
@@ -744,51 +745,3 @@ void TraceLog::SetProcessID(int process_id) {
} // namespace debug
} // namespace base
-
-namespace trace_event_internal {
-
-void TraceEndOnScopeClose::Initialize(const unsigned char* category_enabled,
- const char* name) {
- data_.category_enabled = category_enabled;
- data_.name = name;
- p_data_ = &data_;
-}
-
-void TraceEndOnScopeClose::AddEventIfEnabled() {
- // Only called when p_data_ is non-null.
- if (*p_data_->category_enabled) {
- TRACE_EVENT_API_ADD_TRACE_EVENT(
- TRACE_EVENT_PHASE_END,
- p_data_->category_enabled,
- p_data_->name, kNoEventId,
- kZeroNumArgs, NULL, NULL, NULL,
- kNoThreshholdBeginId, kNoThresholdValue, TRACE_EVENT_FLAG_NONE);
- }
-}
-
-void TraceEndOnScopeCloseThreshold::Initialize(
- const unsigned char* category_enabled,
- const char* name,
- int threshold_begin_id,
- long long threshold) {
- data_.category_enabled = category_enabled;
- data_.name = name;
- data_.threshold_begin_id = threshold_begin_id;
- data_.threshold = threshold;
- p_data_ = &data_;
-}
-
-void TraceEndOnScopeCloseThreshold::AddEventIfEnabled() {
- // Only called when p_data_ is non-null.
- if (*p_data_->category_enabled) {
- TRACE_EVENT_API_ADD_TRACE_EVENT(
- TRACE_EVENT_PHASE_END,
- p_data_->category_enabled,
- p_data_->name, kNoEventId,
- kZeroNumArgs, NULL, NULL, NULL,
- p_data_->threshold_begin_id, p_data_->threshold,
- TRACE_EVENT_FLAG_NONE);
- }
-}
-
-} // namespace trace_event_internal

Powered by Google App Engine
This is Rietveld 408576698