OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/metrics/call_stack_profile_collector.h" | 5 #include "components/metrics/call_stack_profile_collector.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> |
8 | 9 |
9 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
10 #include "components/metrics/call_stack_profile_metrics_provider.h" | 11 #include "components/metrics/call_stack_profile_metrics_provider.h" |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 12 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "mojo/public/cpp/bindings/strong_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_binding.h" |
13 | 14 |
14 namespace metrics { | 15 namespace metrics { |
15 | 16 |
16 CallStackProfileCollector::CallStackProfileCollector( | 17 CallStackProfileCollector::CallStackProfileCollector( |
17 CallStackProfileParams::Process expected_process) | 18 CallStackProfileParams::Process expected_process) |
(...skipping 11 matching lines...) Expand all Loading... |
29 std::move(request)); | 30 std::move(request)); |
30 } | 31 } |
31 | 32 |
32 void CallStackProfileCollector::Collect( | 33 void CallStackProfileCollector::Collect( |
33 const CallStackProfileParams& params, | 34 const CallStackProfileParams& params, |
34 base::TimeTicks start_timestamp, | 35 base::TimeTicks start_timestamp, |
35 std::vector<CallStackProfile> profiles) { | 36 std::vector<CallStackProfile> profiles) { |
36 if (params.process != expected_process_) | 37 if (params.process != expected_process_) |
37 return; | 38 return; |
38 | 39 |
| 40 CallStackProfileParams params_copy = params; |
| 41 params_copy.start_timestamp = start_timestamp; |
39 CallStackProfileMetricsProvider::ReceiveCompletedProfiles( | 42 CallStackProfileMetricsProvider::ReceiveCompletedProfiles( |
40 params, start_timestamp, std::move(profiles)); | 43 ¶ms_copy, std::move(profiles)); |
41 } | 44 } |
42 | 45 |
43 } // namespace metrics | 46 } // namespace metrics |
OLD | NEW |