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

Unified Diff: chromecast/metrics/cast_metrics_service_client.cc

Issue 522853002: Chromecast fix: MetricsStateManager segfaults if callbacks are empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: file rename Created 6 years, 4 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 | « chromecast/chromecast.gyp ('k') | chromecast/metrics/cast_metrics_service_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/metrics/cast_metrics_service_client.cc
diff --git a/chromecast/metrics/cast_metrics_service_client.cc b/chromecast/metrics/cast_metrics_service_client.cc
index 80e80eaab1182ec47ac7bb8c63f643239507728d..c90becf3d31bc0816f58b33411cfc95da10a9ff2 100644
--- a/chromecast/metrics/cast_metrics_service_client.cc
+++ b/chromecast/metrics/cast_metrics_service_client.cc
@@ -7,6 +7,7 @@
#include "base/i18n/rtl.h"
#include "chromecast/common/chromecast_config.h"
#include "chromecast/metrics/platform_metrics_providers.h"
+#include "components/metrics/client_info.h"
#include "components/metrics/metrics_provider.h"
#include "components/metrics/metrics_service.h"
#include "components/metrics/metrics_state_manager.h"
@@ -15,6 +16,17 @@
namespace chromecast {
namespace metrics {
+namespace {
+
+void StoreClientInfo(const ::metrics::ClientInfo& client_info) {
+}
+
+scoped_ptr<::metrics::ClientInfo> LoadClientInfo() {
+ return scoped_ptr<::metrics::ClientInfo>();
+}
+
+} // namespace
+
// static
CastMetricsServiceClient* CastMetricsServiceClient::Create(
PrefService* pref_service,
@@ -92,12 +104,12 @@ CastMetricsServiceClient::CastMetricsServiceClient(
pref_service,
base::Bind(&CastMetricsServiceClient::IsReportingEnabled,
base::Unretained(this)),
- ::metrics::MetricsStateManager::StoreClientInfoCallback(),
- ::metrics::MetricsStateManager::LoadClientInfoCallback())),
+ base::Bind(&StoreClientInfo),
+ base::Bind(&LoadClientInfo))),
metrics_service_(new ::metrics::MetricsService(
metrics_state_manager_.get(),
this,
- ChromecastConfig::GetInstance()->pref_service())),
+ pref_service)),
request_context_(request_context) {
// Always create a client id as it may also be used by crash reporting,
// (indirectly) included in feedback, and can be queried during setup.
« no previous file with comments | « chromecast/chromecast.gyp ('k') | chromecast/metrics/cast_metrics_service_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698