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

Side by Side Diff: chromecast/browser/metrics/cast_metrics_service_client.cc

Issue 844253002: [Chromecast] Fix broken android build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/metrics/cast_metrics_service_client.h" 5 #include "chromecast/browser/metrics/cast_metrics_service_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } 169 }
170 170
171 CastMetricsServiceClient::CastMetricsServiceClient( 171 CastMetricsServiceClient::CastMetricsServiceClient(
172 base::TaskRunner* io_task_runner, 172 base::TaskRunner* io_task_runner,
173 PrefService* pref_service, 173 PrefService* pref_service,
174 net::URLRequestContextGetter* request_context) 174 net::URLRequestContextGetter* request_context)
175 : io_task_runner_(io_task_runner), 175 : io_task_runner_(io_task_runner),
176 pref_service_(pref_service), 176 pref_service_(pref_service),
177 cast_service_(NULL), 177 cast_service_(NULL),
178 #if !defined(OS_ANDROID)
178 external_metrics_(NULL), 179 external_metrics_(NULL),
180 #endif // !defined(OS_ANDROID)
179 metrics_service_loop_(base::MessageLoopProxy::current()), 181 metrics_service_loop_(base::MessageLoopProxy::current()),
180 request_context_(request_context) { 182 request_context_(request_context) {
181 } 183 }
182 184
183 CastMetricsServiceClient::~CastMetricsServiceClient() { 185 CastMetricsServiceClient::~CastMetricsServiceClient() {
186 #if !defined(OS_ANDROID)
184 DCHECK(!external_metrics_); 187 DCHECK(!external_metrics_);
188 #endif // !defined(OS_ANDROID)
185 } 189 }
186 190
187 void CastMetricsServiceClient::Initialize(CastService* cast_service) { 191 void CastMetricsServiceClient::Initialize(CastService* cast_service) {
188 DCHECK(cast_service); 192 DCHECK(cast_service);
189 DCHECK(!cast_service_); 193 DCHECK(!cast_service_);
190 cast_service_ = cast_service; 194 cast_service_ = cast_service;
191 195
192 metrics_state_manager_ = ::metrics::MetricsStateManager::Create( 196 metrics_state_manager_ = ::metrics::MetricsStateManager::Create(
193 pref_service_, 197 pref_service_,
194 base::Bind(&CastMetricsServiceClient::IsReportingEnabled, 198 base::Bind(&CastMetricsServiceClient::IsReportingEnabled,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 #endif // defined(OS_LINUX) 264 #endif // defined(OS_LINUX)
261 metrics_service_->Stop(); 265 metrics_service_->Stop();
262 } 266 }
263 267
264 bool CastMetricsServiceClient::IsReportingEnabled() { 268 bool CastMetricsServiceClient::IsReportingEnabled() {
265 return PlatformIsReportingEnabled(cast_service_); 269 return PlatformIsReportingEnabled(cast_service_);
266 } 270 }
267 271
268 } // namespace metrics 272 } // namespace metrics
269 } // namespace chromecast 273 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698