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

Unified Diff: components/metrics/call_stack_profile_metrics_provider.h

Issue 2438073002: Use movable types for CallStackProfile(s) to remove copying of data. (Closed)
Patch Set: added some comments about std::move Created 4 years, 2 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
Index: components/metrics/call_stack_profile_metrics_provider.h
diff --git a/components/metrics/call_stack_profile_metrics_provider.h b/components/metrics/call_stack_profile_metrics_provider.h
index d26000be087ba95a7242dd8c945431f2105b9229..bd0b721c8093dc4ad9764d64c74f951932e2b9cb 100644
--- a/components/metrics/call_stack_profile_metrics_provider.h
+++ b/components/metrics/call_stack_profile_metrics_provider.h
@@ -31,11 +31,12 @@ class CallStackProfileMetricsProvider : public MetricsProvider {
// Provides completed stack profiles to the metrics provider. Intended for use
// when receiving profiles over IPC. In-process StackSamplingProfiler users
- // should use GetProfilerCallback() instead.
+ // should use GetProfilerCallback() instead. |profiles| is not const& because
+ // it must be passed with std::move.
static void ReceiveCompletedProfiles(
const CallStackProfileParams& params,
base::TimeTicks start_timestamp,
- const base::StackSamplingProfiler::CallStackProfiles& profiles);
+ base::StackSamplingProfiler::CallStackProfiles profiles);
// MetricsProvider:
void OnRecordingEnabled() override;
« no previous file with comments | « components/metrics/call_stack_profile_collector.cc ('k') | components/metrics/call_stack_profile_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698