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

Unified Diff: components/metrics/call_stack_profile_collector.cc

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_collector.cc
diff --git a/components/metrics/call_stack_profile_collector.cc b/components/metrics/call_stack_profile_collector.cc
index cbf466f859a413086348874383abd96fe6d85c62..71f45df07906b46b76f910fd8313e088a6f91a58 100644
--- a/components/metrics/call_stack_profile_collector.cc
+++ b/components/metrics/call_stack_profile_collector.cc
@@ -4,6 +4,8 @@
#include "components/metrics/call_stack_profile_collector.h"
+#include <utility>
+
#include "base/memory/ptr_util.h"
#include "components/metrics/call_stack_profile_metrics_provider.h"
#include "mojo/public/cpp/bindings/interface_request.h"
@@ -29,13 +31,12 @@ void CallStackProfileCollector::Create(
void CallStackProfileCollector::Collect(
const CallStackProfileParams& params,
base::TimeTicks start_timestamp,
- const std::vector<CallStackProfile>& profiles) {
+ std::vector<CallStackProfile> profiles) {
if (params.process != expected_process_)
return;
- CallStackProfileMetricsProvider::ReceiveCompletedProfiles(params,
- start_timestamp,
- profiles);
+ CallStackProfileMetricsProvider::ReceiveCompletedProfiles(
+ params, start_timestamp, std::move(profiles));
}
} // namespace metrics
« no previous file with comments | « components/metrics/call_stack_profile_collector.h ('k') | components/metrics/call_stack_profile_metrics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698