]> git.sesse.net Git - casparcg/blobdiff - dependencies64/cef/linux/include/base/cef_trace_event.h
Upgrade CEF to 3.3029.1611.g44e39a8 / Chromium 58.0.3029.81.
[casparcg] / dependencies64 / cef / linux / include / base / cef_trace_event.h
similarity index 62%
rename from dependencies64/cef/include/cef_trace_event.h
rename to dependencies64/cef/linux/include/base/cef_trace_event.h
index b679433cca623f68ee41d279c4b5048a02acd4c9..20723fbb9922f68591fe67ba90f0f15bbd30be14 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 Marshall A. Greenblatt. Portions copyright (c) 2012
+// Copyright (c) 2014 Marshall A. Greenblatt. Portions copyright (c) 2012
 // Google Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 //
 // Events are issued against categories. Whereas LOG's categories are statically
 // defined, TRACE categories are created implicitly with a string. For example:
-//   CEF_TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent")
+//   TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent")
 //
 // Events can be INSTANT, or can be pairs of BEGIN and END in the same scope:
-//   CEF_TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly")
+//   TRACE_EVENT_BEGIN0("MY_SUBSYSTEM", "SomethingCostly")
 //   doSomethingCostly()
-//   CEF_TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly")
+//   TRACE_EVENT_END0("MY_SUBSYSTEM", "SomethingCostly")
 // Note: Our tools can't always determine the correct BEGIN/END pairs unless
 // these are used in the same scope. Use ASYNC_BEGIN/ASYNC_END macros if you
 // need them to be in separate scopes.
 // A common use case is to trace entire function scopes. This issues a trace
 // BEGIN and END automatically:
 //   void doSomethingCostly() {
-//     CEF_TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly");
+//     TRACE_EVENT0("MY_SUBSYSTEM", "doSomethingCostly");
 //     ...
 //   }
 //
 // Additional parameters can be associated with an event:
 //   void doSomethingCostly2(int howMuch) {
-//     CEF_TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly",
+//     TRACE_EVENT1("MY_SUBSYSTEM", "doSomethingCostly",
 //         "howMuch", howMuch);
 //     ...
 //   }
 //   [single threaded sender code]
 //     static int send_count = 0;
 //     ++send_count;
-//     CEF_TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count);
+//     TRACE_EVENT_ASYNC_BEGIN0("ipc", "message", send_count);
 //     Send(new MyMessage(send_count));
 //   [receive code]
 //     void OnMyMessage(send_count) {
-//       CEF_TRACE_EVENT_ASYNC_END0("ipc", "message", send_count);
+//       TRACE_EVENT_ASYNC_END0("ipc", "message", send_count);
 //     }
 // The third parameter is a unique ID to match ASYNC_BEGIN/ASYNC_END pairs.
 // ASYNC_BEGIN and ASYNC_END can occur on any thread of any traced process.
 //   class MyTracedClass {
 //    public:
 //     MyTracedClass() {
-//       CEF_TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this);
+//       TRACE_EVENT_ASYNC_BEGIN0("category", "MyTracedClass", this);
 //     }
 //     ~MyTracedClass() {
-//       CEF_TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this);
+//       TRACE_EVENT_ASYNC_END0("category", "MyTracedClass", this);
 //     }
 //   }
 //
 // The trace event also supports counters, which is a way to track a quantity
 // as it varies over time. Counters are created with the following macro:
-//   CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue);
+//   TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter", g_myCounterValue);
 //
 // Counters are process-specific. The macro itself can be issued from any
 // thread, however.
 //
 // Sometimes, you want to track two counters at once. You can do this with two
 // counter macros:
-//   CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]);
-//   CEF_TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]);
+//   TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter0", g_myCounterValue[0]);
+//   TRACE_COUNTER1("MY_SUBSYSTEM", "myCounter1", g_myCounterValue[1]);
 // Or you can do it with a combined macro:
-//   CEF_TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter",
+//   TRACE_COUNTER2("MY_SUBSYSTEM", "myCounter",
 //       "bytesPinned", g_myCounterValue[0],
 //       "bytesAllocated", g_myCounterValue[1]);
 // This indicates to the tracing UI that these counters should be displayed
 // in a single graph, as a summed area chart.
 //
 // Since counters are in a global namespace, you may want to disembiguate with a
-// unique ID, by using the CEF_TRACE_COUNTER_ID* variations.
+// unique ID, by using the TRACE_COUNTER_ID* variations.
 //
 // By default, trace collection is compiled in, but turned off at runtime.
 // Collecting trace data is the responsibility of the embedding application. In
 // in for category, name, and arg_names.  Thus, the following code will cause
 // problems:
 //     char* str = strdup("impprtantName");
-//     CEF_TRACE_EVENT_INSTANT0("SUBSYSTEM", str);  // BAD!
+//     TRACE_EVENT_INSTANT0("SUBSYSTEM", str);  // BAD!
 //     free(str);                   // Trace system now has dangling pointer
 //
 // To avoid this issue with the |name| and |arg_name| parameters, use the
-// CEF_TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime
+// TRACE_EVENT_COPY_XXX overloads of the macros at additional runtime
 // overhead.
 // Notes: The category must always be in a long-lived char* (i.e. static const).
 //        The |arg_values|, when used, are always deep copied with the _COPY
 // All macros are thread safe and can be used from any process.
 ///
 
-#ifndef CEF_INCLUDE_CEF_TRACE_EVENT_H_
-#define CEF_INCLUDE_CEF_TRACE_EVENT_H_
+#ifndef CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
+#define CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_
 #pragma once
 
-#include "include/internal/cef_export.h"
-#include "include/internal/cef_types.h"
+#if defined(TRACE_EVENT0)
+// Do nothing if the macros provided by this header already exist.
+// This can happen in cases where Chromium code is used directly by the
+// client application. When using Chromium code directly always include
+// the Chromium header first to avoid type conflicts.
+#elif defined(USING_CHROMIUM_INCLUDES)
+// When building CEF include the Chromium header directly.
+#include "base/trace_event/trace_event.h"
+#else  // !USING_CHROMIUM_INCLUDES
+// The following is substantially similar to the Chromium implementation.
+// If the Chromium implementation diverges the below implementation should be
+// updated to match.
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Functions for tracing counters and functions; called from macros.
-// - |category| string must have application lifetime (static or literal). They
-//   may not include "(quotes) chars.
-// - |argX_name|, |argX_val|, |valueX_name|, |valeX_val| are optional parameters
-//   and represent pairs of name and values of arguments
-// - |copy| is used to avoid memory scoping issues with the |name| and
-//   |arg_name| parameters by copying them
-// - |id| is used to disambiguate counters with the same name, or match async
-//   trace events
-
-CEF_EXPORT void cef_trace_event_instant(const char* category,
-                                        const char* name,
-                                        const char* arg1_name,
-                                        uint64 arg1_val,
-                                        const char* arg2_name,
-                                        uint64 arg2_val,
-                                        int copy);
-CEF_EXPORT void cef_trace_event_begin(const char* category,
-                                      const char* name,
-                                      const char* arg1_name,
-                                      uint64 arg1_val,
-                                      const char* arg2_name,
-                                      uint64 arg2_val,
-                                      int copy);
-CEF_EXPORT void cef_trace_event_end(const char* category,
-                                    const char* name,
-                                    const char* arg1_name,
-                                    uint64 arg1_val,
-                                    const char* arg2_name,
-                                    uint64 arg2_val,
-                                    int copy);
-CEF_EXPORT void cef_trace_counter(const char* category,
-                                  const char* name,
-                                  const char* value1_name,
-                                  uint64 value1_val,
-                                  const char* value2_name,
-                                  uint64 value2_val,
-                                  int copy);
-CEF_EXPORT void cef_trace_counter_id(const char* category,
-                                     const char* name,
-                                     uint64 id,
-                                     const char* value1_name,
-                                     uint64 value1_val,
-                                     const char* value2_name,
-                                     uint64 value2_val,
-                                     int copy);
-CEF_EXPORT void cef_trace_event_async_begin(const char* category,
-                                            const char* name,
-                                            uint64 id,
-                                            const char* arg1_name,
-                                            uint64 arg1_val,
-                                            const char* arg2_name,
-                                            uint64 arg2_val,
-                                            int copy);
-CEF_EXPORT void cef_trace_event_async_step_into(const char* category,
-                                                const char* name,
-                                                uint64 id,
-                                                uint64 step,
-                                                const char* arg1_name,
-                                                uint64 arg1_val,
-                                                int copy);
-CEF_EXPORT void cef_trace_event_async_step_past(const char* category,
-                                                const char* name,
-                                                uint64 id,
-                                                uint64 step,
-                                                const char* arg1_name,
-                                                uint64 arg1_val,
-                                                int copy);
-CEF_EXPORT void cef_trace_event_async_end(const char* category,
-                                          const char* name,
-                                          uint64 id,
-                                          const char* arg1_name,
-                                          uint64 arg1_val,
-                                          const char* arg2_name,
-                                          uint64 arg2_val,
-                                          int copy);
-
-#ifdef __cplusplus
-}
-#endif
+#include "include/internal/cef_trace_event_internal.h"
 
 // Records a pair of begin and end events called "name" for the current
 // scope, with 0, 1 or 2 associated arguments. If the category is not
 // enabled, then this does nothing.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_EVENT0(category, name) \
+#define TRACE_EVENT0(category, name) \
   cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false); \
   CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
-#define CEF_TRACE_EVENT1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT1(category, name, arg1_name, arg1_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false); \
   CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name)
-#define CEF_TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \
+#define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, \
                                         arg2_name, arg2_val, false); \
@@ -257,7 +184,7 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 
 // Implementation detail: internal macro to end end event when the scope ends.
 #define CEF_INTERNAL_TRACE_END_ON_SCOPE_CLOSE(category, name) \
-   cef_trace_event_internal::CefTraceEndOnScopeClose \
+   cef_trace_event::CefTraceEndOnScopeClose \
        CEF_INTERNAL_TRACE_EVENT_UID(profileScope)(category, name)
 
 // Records a single event called "name" immediately, with 0, 1 or 2
@@ -265,19 +192,19 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // does nothing.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_EVENT_INSTANT0(category, name) \
+#define TRACE_EVENT_INSTANT0(category, name) \
   cef_trace_event_instant(category, name, NULL, 0, NULL, 0, false)
-#define CEF_TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_INSTANT1(category, name, arg1_name, arg1_val) \
   cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define CEF_TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_INSTANT2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, false)
-#define CEF_TRACE_EVENT_COPY_INSTANT0(category, name) \
+#define TRACE_EVENT_COPY_INSTANT0(category, name) \
   cef_trace_event_instant(category, name, NULL, 0, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_COPY_INSTANT1(category, name, arg1_name, arg1_val) \
   cef_trace_event_instant(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_COPY_INSTANT2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_instant(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, true)
@@ -287,19 +214,19 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // does nothing.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_EVENT_BEGIN0(category, name) \
+#define TRACE_EVENT_BEGIN0(category, name) \
   cef_trace_event_begin(category, name, NULL, 0, NULL, 0, false)
-#define CEF_TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_BEGIN1(category, name, arg1_name, arg1_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define CEF_TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_BEGIN2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, false)
-#define CEF_TRACE_EVENT_COPY_BEGIN0(category, name) \
+#define TRACE_EVENT_COPY_BEGIN0(category, name) \
   cef_trace_event_begin(category, name, NULL, 0, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_COPY_BEGIN1(category, name, arg1_name, arg1_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_COPY_BEGIN2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_begin(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, true)
@@ -308,19 +235,19 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // is not enabled, then this does nothing.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_EVENT_END0(category, name) \
+#define TRACE_EVENT_END0(category, name) \
   cef_trace_event_end(category, name, NULL, 0, NULL, 0, false)
-#define CEF_TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_END1(category, name, arg1_name, arg1_val) \
   cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, false)
-#define CEF_TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_END2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, false)
-#define CEF_TRACE_EVENT_COPY_END0(category, name) \
+#define TRACE_EVENT_COPY_END0(category, name) \
   cef_trace_event_end(category, name, NULL, 0, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
+#define TRACE_EVENT_COPY_END1(category, name, arg1_name, arg1_val) \
   cef_trace_event_end(category, name, arg1_name, arg1_val, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \
+#define TRACE_EVENT_COPY_END2(category, name, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_end(category, name, arg1_name, arg1_val, arg2_name, \
       arg2_val, true)
@@ -329,9 +256,9 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // must be representable as a 32 bit integer.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_COUNTER1(category, name, value) \
+#define TRACE_COUNTER1(category, name, value) \
   cef_trace_counter(category, name, NULL, value, NULL, 0, false)
-#define CEF_TRACE_COPY_COUNTER1(category, name, value) \
+#define TRACE_COPY_COUNTER1(category, name, value) \
   cef_trace_counter(category, name, NULL, value, NULL, 0, true)
 
 // Records the values of a multi-parted counter called "name" immediately.
@@ -339,11 +266,11 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // values as a stacked-bar chart.
 // - category and name strings must have application lifetime (statics or
 //   literals). They may not include " chars.
-#define CEF_TRACE_COUNTER2(category, name, value1_name, value1_val, \
+#define TRACE_COUNTER2(category, name, value1_name, value1_val, \
       value2_name, value2_val) \
   cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
       value2_val, false)
-#define CEF_TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
+#define TRACE_COPY_COUNTER2(category, name, value1_name, value1_val, \
       value2_name, value2_val) \
   cef_trace_counter(category, name, value1_name, value1_val, value2_name, \
       value2_val, true)
@@ -356,9 +283,9 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 //   be a pointer or an integer value up to 64 bits. If it's a pointer, the
 //   bits will be xored with a hash of the process ID so that the same pointer
 //   on two different processes will not collide.
-#define CEF_TRACE_COUNTER_ID1(category, name, id, value) \
+#define TRACE_COUNTER_ID1(category, name, id, value) \
   cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, false)
-#define CEF_TRACE_COPY_COUNTER_ID1(category, name, id, value) \
+#define TRACE_COPY_COUNTER_ID1(category, name, id, value) \
   cef_trace_counter_id(category, name, id, NULL, value, NULL, 0, true)
 
 // Records the values of a multi-parted counter called "name" immediately.
@@ -370,11 +297,11 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 //   be a pointer or an integer value up to 64 bits. If it's a pointer, the
 //   bits will be xored with a hash of the process ID so that the same pointer
 //   on two different processes will not collide.
-#define CEF_TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
+#define TRACE_COUNTER_ID2(category, name, id, value1_name, value1_val, \
       value2_name, value2_val) \
   cef_trace_counter_id(category, name, id, value1_name, value1_val, \
       value2_name, value2_val, false)
-#define CEF_TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \
+#define TRACE_COPY_COUNTER_ID2(category, name, id, value1_name, \
       value1_val, value2_name, value2_val) \
   cef_trace_counter_id(category, name, id, value1_name, value1_val, \
       value2_name, value2_val, true)
@@ -396,22 +323,22 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // An async operation can span threads and processes, but all events in that
 // operation must use the same |name| and |id|. Each event can have its own
 // args.
-#define CEF_TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
+#define TRACE_EVENT_ASYNC_BEGIN0(category, name, id) \
   cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, false)
-#define CEF_TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
+#define TRACE_EVENT_ASYNC_BEGIN1(category, name, id, arg1_name, arg1_val) \
   cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
       0, false)
-#define CEF_TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
+#define TRACE_EVENT_ASYNC_BEGIN2(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val, false)
-#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
+#define TRACE_EVENT_COPY_ASYNC_BEGIN0(category, name, id) \
   cef_trace_event_async_begin(category, name, id, NULL, 0, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \
+#define TRACE_EVENT_COPY_ASYNC_BEGIN1(category, name, id, arg1_name, \
       arg1_val) \
   cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, NULL, \
       0, true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \
+#define TRACE_EVENT_COPY_ASYNC_BEGIN2(category, name, id, arg1_name, \
       arg1_val, arg2_name, arg2_val) \
   cef_trace_event_async_begin(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val, true)
@@ -422,15 +349,15 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // within the async event. This should be called at the beginning of the next
 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
 // ASYNC_STEP_PAST events.
-#define CEF_TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
+#define TRACE_EVENT_ASYNC_STEP_INTO0(category, name, id, step) \
   cef_trace_event_async_step_into(category, name, id, step, NULL, 0, false)
-#define CEF_TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \
+#define TRACE_EVENT_ASYNC_STEP_INTO1(category, name, id, step, \
       arg1_name, arg1_val) \
   cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
       arg1_val, false)
-#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
+#define TRACE_EVENT_COPY_ASYNC_STEP_INTO0(category, name, id, step) \
   cef_trace_event_async_step_into(category, name, id, step, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \
+#define TRACE_EVENT_COPY_ASYNC_STEP_INTO1(category, name, id, step, \
       arg1_name, arg1_val) \
   cef_trace_event_async_step_into(category, name, id, step, arg1_name, \
       arg1_val, true)
@@ -441,44 +368,44 @@ CEF_EXPORT void cef_trace_event_async_end(const char* category,
 // within the async event. This should be called at the beginning of the next
 // phase of an asynchronous operation. The ASYNC_BEGIN event must not have any
 // ASYNC_STEP_INTO events.
-#define CEF_TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
+#define TRACE_EVENT_ASYNC_STEP_PAST0(category, name, id, step) \
   cef_trace_event_async_step_past(category, name, id, step, NULL, 0, false)
-#define CEF_TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \
+#define TRACE_EVENT_ASYNC_STEP_PAST1(category, name, id, step, \
       arg1_name, arg1_val) \
   cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
       arg1_val, false)
-#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
+#define TRACE_EVENT_COPY_ASYNC_STEP_PAST0(category, name, id, step) \
   cef_trace_event_async_step_past(category, name, id, step, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \
+#define TRACE_EVENT_COPY_ASYNC_STEP_PAST1(category, name, id, step, \
       arg1_name, arg1_val) \
   cef_trace_event_async_step_past(category, name, id, step, arg1_name, \
       arg1_val, true)
 
 // Records a single ASYNC_END event for "name" immediately. If the category
 // is not enabled, then this does nothing.
-#define CEF_TRACE_EVENT_ASYNC_END0(category, name, id) \
+#define TRACE_EVENT_ASYNC_END0(category, name, id) \
   cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, false)
-#define CEF_TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
+#define TRACE_EVENT_ASYNC_END1(category, name, id, arg1_name, arg1_val) \
   cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
       false)
-#define CEF_TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
+#define TRACE_EVENT_ASYNC_END2(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val) \
   cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val, false)
-#define CEF_TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
+#define TRACE_EVENT_COPY_ASYNC_END0(category, name, id) \
   cef_trace_event_async_end(category, name, id, NULL, 0, NULL, 0, true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \
+#define TRACE_EVENT_COPY_ASYNC_END1(category, name, id, arg1_name, \
       arg1_val) \
   cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, NULL, 0, \
       true)
-#define CEF_TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \
+#define TRACE_EVENT_COPY_ASYNC_END2(category, name, id, arg1_name, \
       arg1_val, arg2_name, arg2_val) \
   cef_trace_event_async_end(category, name, id, arg1_name, arg1_val, \
       arg2_name, arg2_val, true)
 
-namespace cef_trace_event_internal {
+namespace cef_trace_event {
 
-// Used by CEF_TRACE_EVENTx macro. Do not use directly.
+// Used by TRACE_EVENTx macro. Do not use directly.
 class CefTraceEndOnScopeClose {
  public:
   CefTraceEndOnScopeClose(const char* category, const char* name)
@@ -493,6 +420,8 @@ class CefTraceEndOnScopeClose {
   const char* name_;
 };
 
-}  // cef_trace_event_internal
+}  // cef_trace_event
+
+#endif  // !USING_CHROMIUM_INCLUDES
 
-#endif  // CEF_INCLUDE_CEF_TRACE_EVENT_H_
+#endif  // CEF_INCLUDE_BASE_CEF_TRACE_EVENT_H_