summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 21:48:17 +0000
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-21 21:48:17 +0000
commitdc69c927cc3531871721f43f498113d3bdacbc21 (patch)
tree0c44740edade4e67cf1b659727287840e65c0673
parent690679e143ba9762ba4cbd2721a922e914189116 (diff)
downloadchromium_src-dc69c927cc3531871721f43f498113d3bdacbc21.zip
chromium_src-dc69c927cc3531871721f43f498113d3bdacbc21.tar.gz
chromium_src-dc69c927cc3531871721f43f498113d3bdacbc21.tar.bz2
Remove temporary code after migration of Platform::updateTraceEventDuration
BUG=none Review URL: https://codereview.chromium.org/79373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236603 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/debug/trace_event_impl.cc23
-rw-r--r--webkit/child/webkitplatformsupport_impl.cc6
-rw-r--r--webkit/child/webkitplatformsupport_impl.h2
3 files changed, 5 insertions, 26 deletions
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index ad7c9ac..23d2527 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -1930,15 +1930,12 @@ void TraceLog::UpdateTraceEventDuration(
const unsigned char* category_group_enabled,
const char* name,
TraceEventHandle handle) {
- OptionalAutoLock lock(lock_);
-
TimeTicks now = OffsetNow();
- TraceEvent* trace_event = NULL;
- // TODO(wangxianzhu): Remove the !category_group_enabled condition after
- // all clients migrate to the new UpdateTraceEventDuration API.
- if (!category_group_enabled ||
- (*category_group_enabled & ENABLED_FOR_RECORDING)) {
- trace_event = GetEventByHandleInternal(handle, &lock);
+
+ if (*category_group_enabled & ENABLED_FOR_RECORDING) {
+ OptionalAutoLock lock(lock_);
+
+ TraceEvent* trace_event = GetEventByHandleInternal(handle, &lock);
if (trace_event) {
DCHECK(trace_event->phase() == TRACE_EVENT_PHASE_COMPLETE);
trace_event->UpdateDuration(now);
@@ -1953,16 +1950,6 @@ void TraceLog::UpdateTraceEventDuration(
}
}
- // TODO(wangxianzhu): Remove this block after all clients migrate to the
- // new UpdateTraceEventDuration API.
- if (!category_group_enabled || !name) {
- if (!trace_event)
- return;
- category_group_enabled = trace_event->category_group_enabled();
- name = trace_event->name();
- }
-
- lock.EnsureReleased();
if (*category_group_enabled & ENABLED_FOR_EVENT_CALLBACK) {
EventCallback event_callback = reinterpret_cast<EventCallback>(
subtle::NoBarrier_Load(&event_callback_));
diff --git a/webkit/child/webkitplatformsupport_impl.cc b/webkit/child/webkitplatformsupport_impl.cc
index 48c8854..137a2b3 100644
--- a/webkit/child/webkitplatformsupport_impl.cc
+++ b/webkit/child/webkitplatformsupport_impl.cc
@@ -490,12 +490,6 @@ blink::Platform::TraceEventHandle WebKitPlatformSupportImpl::addTraceEvent(
return result;
}
-// TODO(wangxianzhu): Remove this.
-void WebKitPlatformSupportImpl::updateTraceEventDuration(
- TraceEventHandle handle) {
- updateTraceEventDuration(NULL, NULL, handle);
-}
-
void WebKitPlatformSupportImpl::updateTraceEventDuration(
const unsigned char* category_group_enabled,
const char* name,
diff --git a/webkit/child/webkitplatformsupport_impl.h b/webkit/child/webkitplatformsupport_impl.h
index 175bfe3..000708b 100644
--- a/webkit/child/webkitplatformsupport_impl.h
+++ b/webkit/child/webkitplatformsupport_impl.h
@@ -88,8 +88,6 @@ class WEBKIT_CHILD_EXPORT WebKitPlatformSupportImpl :
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags);
- // TODO(wangxianzhu): Remove this function after transition to the new one.
- virtual void updateTraceEventDuration(TraceEventHandle);
virtual void updateTraceEventDuration(
const unsigned char* category_group_enabled,
const char* name,