Index: components/metrics/call_stack_profile_collector.cc |
diff --git a/components/metrics/call_stack_profile_collector.cc b/components/metrics/call_stack_profile_collector.cc |
index 8a7a68b9eae367a2adfaf385a26853245ec4610c..cbf466f859a413086348874383abd96fe6d85c62 100644 |
--- a/components/metrics/call_stack_profile_collector.cc |
+++ b/components/metrics/call_stack_profile_collector.cc |
@@ -11,21 +11,28 @@ |
namespace metrics { |
-CallStackProfileCollector::CallStackProfileCollector() {} |
+CallStackProfileCollector::CallStackProfileCollector( |
+ CallStackProfileParams::Process expected_process) |
+ : expected_process_(expected_process) {} |
CallStackProfileCollector::~CallStackProfileCollector() {} |
// static |
void CallStackProfileCollector::Create( |
+ CallStackProfileParams::Process expected_process, |
mojom::CallStackProfileCollectorRequest request) { |
- mojo::MakeStrongBinding(base::MakeUnique<CallStackProfileCollector>(), |
- std::move(request)); |
+ mojo::MakeStrongBinding( |
+ base::MakeUnique<CallStackProfileCollector>(expected_process), |
+ std::move(request)); |
} |
void CallStackProfileCollector::Collect( |
const CallStackProfileParams& params, |
base::TimeTicks start_timestamp, |
const std::vector<CallStackProfile>& profiles) { |
+ if (params.process != expected_process_) |
+ return; |
+ |
CallStackProfileMetricsProvider::ReceiveCompletedProfiles(params, |
start_timestamp, |
profiles); |