Index: components/metrics/call_stack_profile_metrics_provider.cc |
diff --git a/components/metrics/call_stack_profile_metrics_provider.cc b/components/metrics/call_stack_profile_metrics_provider.cc |
index 7ed60f5ba6b301b215582a6212a8e4162faeddf2..f96923bc5193d350be9fd8c96f922ab4cb725043 100644 |
--- a/components/metrics/call_stack_profile_metrics_provider.cc |
+++ b/components/metrics/call_stack_profile_metrics_provider.cc |
@@ -42,7 +42,7 @@ void CopySampleToProto( |
// A frame may not have a valid module. If so, we can't compute the |
// instruction pointer offset, and we don't want to send bare pointers, so |
// leave call_stack_entry empty. |
- if (frame.module_index < 0) |
+ if (frame.module_index == StackSamplingProfiler::Frame::kUnknownModuleIndex) |
continue; |
int64 module_offset = |
reinterpret_cast<const char*>(frame.instruction_pointer) - |
@@ -55,7 +55,7 @@ void CopySampleToProto( |
// Transcode |profile| into |proto_profile|. |
void CopyProfileToProto( |
- const StackSamplingProfiler::Profile& profile, |
+ const StackSamplingProfiler::CallStackProfile& profile, |
CallStackProfile* proto_profile) { |
if (profile.samples.empty()) |
return; |
@@ -112,13 +112,13 @@ CallStackProfileMetricsProvider::~CallStackProfileMetricsProvider() {} |
void CallStackProfileMetricsProvider::ProvideGeneralMetrics( |
ChromeUserMetricsExtension* uma_proto) { |
- std::vector<StackSamplingProfiler::Profile> profiles; |
+ std::vector<StackSamplingProfiler::CallStackProfile> profiles; |
if (!source_profiles_for_test_.empty()) |
profiles.swap(source_profiles_for_test_); |
else |
StackSamplingProfiler::GetPendingProfiles(&profiles); |
- for (const StackSamplingProfiler::Profile& profile : profiles) { |
+ for (const StackSamplingProfiler::CallStackProfile& profile : profiles) { |
Ilya Sherman
2015/04/01 00:27:46
nit: Mebbe a good spot for "const auto&"?
Mike Wittman
2015/04/01 00:48:50
Although long, I'd say the type information is sti
|
CallStackProfile* call_stack_profile = |
uma_proto->add_sampled_profile()->mutable_call_stack_profile(); |
CopyProfileToProto(profile, call_stack_profile); |
@@ -126,7 +126,7 @@ void CallStackProfileMetricsProvider::ProvideGeneralMetrics( |
} |
void CallStackProfileMetricsProvider::SetSourceProfilesForTesting( |
- const std::vector<StackSamplingProfiler::Profile>& profiles) { |
+ const std::vector<StackSamplingProfiler::CallStackProfile>& profiles) { |
source_profiles_for_test_ = profiles; |
} |