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

Unified Diff: components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.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
« no previous file with comments | « components/metrics/public/cpp/call_stack_profile.typemap ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc
diff --git a/components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc b/components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc
index 14db487f452cd61545af8e5f7f617a98f6590234..22265a6182249befd8498621825a99c7f69d02d1 100644
--- a/components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc
+++ b/components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc
@@ -49,9 +49,9 @@ class CallStackProfileCollectorTestImpl
callback.Run(in);
}
- void BounceProfile(const base::StackSamplingProfiler::CallStackProfile& in,
+ void BounceProfile(base::StackSamplingProfiler::CallStackProfile in,
const BounceProfileCallback& callback) override {
- callback.Run(in);
+ callback.Run(std::move(in));
}
void BounceTrigger(CallStackProfileParams::Trigger in,
@@ -263,7 +263,7 @@ TEST_F(CallStackProfileStructTraitsTest, Profile) {
Profile output;
EXPECT_EQ(input.expect_success,
- proxy_->BounceProfile(input.profile, &output));
+ proxy_->BounceProfile(input.profile.CopyForTesting(), &output));
if (!input.expect_success)
continue;
« no previous file with comments | « components/metrics/public/cpp/call_stack_profile.typemap ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698