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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc

Issue 2837323002: Merged all PointerToId functions into TraceHelper::PointerToString. (Closed)
Patch Set: Converted TraceHelper the class to trace_helper the namespace. Created 3 years, 7 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 | « third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
index 500c89a5ab96c5d9bc8bfdef2f391d834e7d20f3..5101de0d7b1a58fb04f0ca3cfb4d8aa8a974433d 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl.cc
@@ -8,6 +8,7 @@
#include "base/strings/stringprintf.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/WebFrameScheduler.h"
+#include "platform/scheduler/base/trace_helper.h"
#include "platform/scheduler/base/virtual_time_domain.h"
#include "platform/scheduler/child/scheduler_tqm_delegate.h"
#include "platform/scheduler/renderer/auto_advancing_virtual_time_domain.h"
@@ -84,12 +85,6 @@ base::TimeDelta GetInitialBudget(
return base::TimeDelta::FromSecondsD(initial_budget);
}
-std::string PointerToId(void* pointer) {
- return base::StringPrintf(
- "0x%" PRIx64,
- static_cast<uint64_t>(reinterpret_cast<uintptr_t>(pointer)));
-}
-
} // namespace
WebViewSchedulerImpl::WebViewSchedulerImpl(
@@ -329,7 +324,8 @@ void WebViewSchedulerImpl::AsValueInto(
state->BeginDictionary("frame_schedulers");
for (WebFrameSchedulerImpl* frame_scheduler : frame_schedulers_) {
- state->BeginDictionaryWithCopiedName(PointerToId(frame_scheduler));
+ state->BeginDictionaryWithCopiedName(
+ trace_helper::PointerToString(frame_scheduler));
frame_scheduler->AsValueInto(state);
state->EndDictionary();
}
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698