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

Unified Diff: components/metrics/profiler/profiler_metrics_provider.cc

Issue 953403002: Constructor without callback added to ProfilerMetricsProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Constructor of provider is moved and comment added Created 5 years, 10 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/profiler/profiler_metrics_provider.cc
diff --git a/components/metrics/profiler/profiler_metrics_provider.cc b/components/metrics/profiler/profiler_metrics_provider.cc
index bec5451dd00a8b77879acbcf299eeb3f78ad7d2f..16a0f278b3245d672dff77fa56810b8fcbd76022 100644
--- a/components/metrics/profiler/profiler_metrics_provider.cc
+++ b/components/metrics/profiler/profiler_metrics_provider.cc
@@ -117,6 +117,9 @@ bool IsCellularEnabledByExperiment() {
} // namespace
+ProfilerMetricsProvider::ProfilerMetricsProvider() : has_profiler_data_(false) {
+}
+
ProfilerMetricsProvider::ProfilerMetricsProvider(
const base::Callback<void(bool*)>& cellular_callback)
: has_profiler_data_(false), cellular_callback_(cellular_callback) {
@@ -158,7 +161,8 @@ void ProfilerMetricsProvider::RecordProfilerData(
bool ProfilerMetricsProvider::IsCellularConnection() {
bool is_cellular = false;
- // For android get current connection type from NetworkMetricsProvider.
+// For android get current connection type from NetworkMetricsProvider if the
+// callback exists.
#if defined(OS_ANDROID)
if (!cellular_callback_.is_null())
cellular_callback_.Run(&is_cellular);

Powered by Google App Engine
This is Rietveld 408576698