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

Unified Diff: ppapi/shared_impl/ppb_trace_event_impl.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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
« no previous file with comments | « ppapi/shared_impl/ppb_trace_event_impl.h ('k') | ppapi/shared_impl/ppb_url_util_shared.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppb_trace_event_impl.cc
diff --git a/ppapi/shared_impl/ppb_trace_event_impl.cc b/ppapi/shared_impl/ppb_trace_event_impl.cc
index 80037d693c4d0279fb577f31e3e18acd0b5375a6..ce1afb94b51bb18d824a536088e3ea54a47883bc 100644
--- a/ppapi/shared_impl/ppb_trace_event_impl.cc
+++ b/ppapi/shared_impl/ppb_trace_event_impl.cc
@@ -9,7 +9,6 @@
#include "base/threading/platform_thread.h"
#include "ppapi/thunk/thunk.h"
-
namespace ppapi {
// PPB_Trace_Event_Dev is a shared implementation because Trace Events can be
@@ -30,27 +29,33 @@ void* TraceEventImpl::GetCategoryEnabled(const char* category_name) {
}
// static
-void TraceEventImpl::AddTraceEvent(
- int8_t phase,
- const void* category_enabled,
- const char* name,
- uint64_t id,
- uint32_t num_args,
- const char* arg_names[],
- const uint8_t arg_types[],
- const uint64_t arg_values[],
- uint8_t flags) {
+void TraceEventImpl::AddTraceEvent(int8_t phase,
+ const void* category_enabled,
+ const char* name,
+ uint64_t id,
+ uint32_t num_args,
+ const char* arg_names[],
+ const uint8_t arg_types[],
+ const uint64_t arg_values[],
+ uint8_t flags) {
COMPILE_ASSERT(sizeof(unsigned long long) == sizeof(uint64_t), msg);
- base::debug::TraceLog::GetInstance()->AddTraceEvent(phase,
- static_cast<const unsigned char*>(category_enabled), name, id, num_args,
- arg_names, arg_types,
+ base::debug::TraceLog::GetInstance()->AddTraceEvent(
+ phase,
+ static_cast<const unsigned char*>(category_enabled),
+ name,
+ id,
+ num_args,
+ arg_names,
+ arg_types,
// This cast is necessary for LP64 systems, where uint64_t is defined as
// an unsigned long int, but trace_event internals are hermetic and
// accepts an |unsigned long long*|. The pointer types are compatible but
// the compiler throws an error without an explicit cast.
- reinterpret_cast<const unsigned long long*>(arg_values), NULL, flags);
+ reinterpret_cast<const unsigned long long*>(arg_values),
+ NULL,
+ flags);
}
// static
@@ -68,15 +73,21 @@ void TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp(
uint8_t flags) {
base::debug::TraceLog::GetInstance()->AddTraceEventWithThreadIdAndTimestamp(
phase,
- static_cast<const unsigned char*>(category_enabled), name, id,
+ static_cast<const unsigned char*>(category_enabled),
+ name,
+ id,
thread_id,
base::TimeTicks::FromInternalValue(timestamp),
- num_args, arg_names, arg_types,
+ num_args,
+ arg_names,
+ arg_types,
// This cast is necessary for LP64 systems, where uint64_t is defined as
// an unsigned long int, but trace_event internals are hermetic and
// accepts an |unsigned long long*|. The pointer types are compatible but
// the compiler throws an error without an explicit cast.
- reinterpret_cast<const unsigned long long*>(arg_values), NULL, flags);
+ reinterpret_cast<const unsigned long long*>(arg_values),
+ NULL,
+ flags);
}
// static
@@ -92,18 +103,15 @@ void TraceEventImpl::SetThreadName(const char* thread_name) {
namespace {
const PPB_Trace_Event_Dev_0_1 g_ppb_trace_event_thunk_0_1 = {
- &TraceEventImpl::GetCategoryEnabled,
- &TraceEventImpl::AddTraceEvent,
- &TraceEventImpl::SetThreadName,
-};
+ &TraceEventImpl::GetCategoryEnabled, &TraceEventImpl::AddTraceEvent,
+ &TraceEventImpl::SetThreadName, };
const PPB_Trace_Event_Dev_0_2 g_ppb_trace_event_thunk_0_2 = {
- &TraceEventImpl::GetCategoryEnabled,
- &TraceEventImpl::AddTraceEvent,
- &TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp,
- &TraceEventImpl::Now,
- &TraceEventImpl::SetThreadName,
-};
+ &TraceEventImpl::GetCategoryEnabled,
+ &TraceEventImpl::AddTraceEvent,
+ &TraceEventImpl::AddTraceEventWithThreadIdAndTimestamp,
+ &TraceEventImpl::Now,
+ &TraceEventImpl::SetThreadName, };
} // namespace ppapi
« no previous file with comments | « ppapi/shared_impl/ppb_trace_event_impl.h ('k') | ppapi/shared_impl/ppb_url_util_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698