Commit 733de146 authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Remove redundant function param in GetProfilerCallback()

Bug: 851163
Change-Id: I93d7ea84b7a3b99058a4a619782501aba2e0f21f
Reviewed-on: https://chromium-review.googlesource.com/1174976Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583122}
parent 03ea533a
......@@ -235,13 +235,12 @@ ThreadProfiler::GetReceiverCallback() {
// metrics::SampledProfile profile);
//
// and this function should bind base::TimeTicks::Now() to those functions.
base::TimeTicks profile_start_time = base::TimeTicks::Now();
if (GetProcess() == CallStackProfileParams::BROWSER_PROCESS) {
return metrics::CallStackProfileMetricsProvider::
GetProfilerCallbackForBrowserProcess();
}
return g_child_call_stack_profile_collector.Get()
.ChildCallStackProfileCollector::GetProfilerCallback(profile_start_time);
.ChildCallStackProfileCollector::GetProfilerCallback();
}
// static
......
......@@ -35,11 +35,10 @@ ChildCallStackProfileCollector::ChildCallStackProfileCollector() {}
ChildCallStackProfileCollector::~ChildCallStackProfileCollector() {}
CallStackProfileBuilder::CompletedCallback
ChildCallStackProfileCollector::GetProfilerCallback(
base::TimeTicks profile_start_time) {
ChildCallStackProfileCollector::GetProfilerCallback() {
return base::Bind(&ChildCallStackProfileCollector::Collect,
// This class has lazy instance lifetime.
base::Unretained(this), profile_start_time);
base::Unretained(this), base::TimeTicks::Now());
}
void ChildCallStackProfileCollector::SetParentProfileCollector(
......
......@@ -56,8 +56,7 @@ class ChildCallStackProfileCollector {
// completed profile to this object. The callback should be immediately passed
// to the CallStackProfileBuilder, and should not be reused between
// CallStackProfileBuilders. This function may be called on any thread.
CallStackProfileBuilder::CompletedCallback GetProfilerCallback(
base::TimeTicks profile_start_time);
CallStackProfileBuilder::CompletedCallback GetProfilerCallback();
// Sets the CallStackProfileCollector interface from |parent_collector|. This
// function MUST be invoked exactly once, regardless of whether
......
......@@ -42,8 +42,7 @@ class ChildCallStackProfileCollectorTest : public testing::Test {
: receiver_impl_(new Receiver(MakeRequest(&receiver_))) {}
void CollectEmptyProfile() {
child_collector_.GetProfilerCallback(base::TimeTicks::Now())
.Run(SampledProfile());
child_collector_.GetProfilerCallback().Run(SampledProfile());
}
const std::vector<ChildCallStackProfileCollector::ProfileState>& profiles()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment