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

Side by Side Diff: components/metrics/child_call_stack_profile_collector_unittest.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 unified diff | Download patch
OLDNEW
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/child_call_stack_profile_collector.h" 5 #include "components/metrics/child_call_stack_profile_collector.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 std::vector<ChildCallStackProfileCollector::ProfilesState> profiles; 46 std::vector<ChildCallStackProfileCollector::ProfilesState> profiles;
47 47
48 private: 48 private:
49 mojo::Binding<mojom::CallStackProfileCollector> binding_; 49 mojo::Binding<mojom::CallStackProfileCollector> binding_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(Receiver); 51 DISALLOW_COPY_AND_ASSIGN(Receiver);
52 }; 52 };
53 53
54 ChildCallStackProfileCollectorTest() 54 ChildCallStackProfileCollectorTest()
55 : receiver_impl_(new Receiver(GetProxy(&receiver_))) {} 55 : receiver_impl_(new Receiver(MakeRequest(&receiver_))) {}
56 56
57 void CollectEmptyProfiles( 57 void CollectEmptyProfiles(
58 const CallStackProfileParams& params, 58 const CallStackProfileParams& params,
59 size_t profile_count) { 59 size_t profile_count) {
60 base::StackSamplingProfiler::CallStackProfiles profiles; 60 base::StackSamplingProfiler::CallStackProfiles profiles;
61 for (size_t i = 0; i < profile_count; ++i) 61 for (size_t i = 0; i < profile_count; ++i)
62 profiles.push_back(base::StackSamplingProfiler::CallStackProfile()); 62 profiles.push_back(base::StackSamplingProfiler::CallStackProfile());
63 child_collector_.GetProfilerCallback(params).Run(std::move(profiles)); 63 child_collector_.GetProfilerCallback(params).Run(std::move(profiles));
64 } 64 }
65 65
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 CollectEmptyProfiles( 168 CollectEmptyProfiles(
169 CallStackProfileParams(CallStackProfileParams::GPU_PROCESS, 169 CallStackProfileParams(CallStackProfileParams::GPU_PROCESS,
170 CallStackProfileParams::GPU_MAIN_THREAD, 170 CallStackProfileParams::GPU_MAIN_THREAD,
171 CallStackProfileParams::THREAD_HUNG, 171 CallStackProfileParams::THREAD_HUNG,
172 CallStackProfileParams::PRESERVE_ORDER), 172 CallStackProfileParams::PRESERVE_ORDER),
173 1); 173 1);
174 EXPECT_EQ(0u, profiles().size()); 174 EXPECT_EQ(0u, profiles().size());
175 } 175 }
176 176
177 } // namespace metrics 177 } // namespace metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698