| OLD | NEW | 
|    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 30 matching lines...) Expand all  Loading... | 
|   41                                                       request_context)); |   41                                                       request_context)); | 
|   42 } |   42 } | 
|   43  |   43  | 
|   44 void CastMetricsServiceClient::SetMetricsClientId( |   44 void CastMetricsServiceClient::SetMetricsClientId( | 
|   45     const std::string& client_id) { |   45     const std::string& client_id) { | 
|   46   client_id_ = client_id; |   46   client_id_ = client_id; | 
|   47   LOG(INFO) << "Metrics client ID set: " << client_id; |   47   LOG(INFO) << "Metrics client ID set: " << client_id; | 
|   48   PlatformSetClientID(cast_service_, client_id); |   48   PlatformSetClientID(cast_service_, client_id); | 
|   49 } |   49 } | 
|   50  |   50  | 
 |   51 void CastMetricsServiceClient::OnRecordingDisabled() { | 
 |   52 } | 
 |   53  | 
|   51 void CastMetricsServiceClient::StoreClientInfo( |   54 void CastMetricsServiceClient::StoreClientInfo( | 
|   52     const ::metrics::ClientInfo& client_info) { |   55     const ::metrics::ClientInfo& client_info) { | 
|   53   const std::string& client_id = client_info.client_id; |   56   const std::string& client_id = client_info.client_id; | 
|   54   DCHECK(client_id.empty() || base::IsValidGUID(client_id)); |   57   DCHECK(client_id.empty() || base::IsValidGUID(client_id)); | 
|   55   // backup client_id or reset to empty. |   58   // backup client_id or reset to empty. | 
|   56   SetMetricsClientId(client_id); |   59   SetMetricsClientId(client_id); | 
|   57 } |   60 } | 
|   58  |   61  | 
|   59 scoped_ptr< ::metrics::ClientInfo> CastMetricsServiceClient::LoadClientInfo() { |   62 scoped_ptr< ::metrics::ClientInfo> CastMetricsServiceClient::LoadClientInfo() { | 
|   60   scoped_ptr< ::metrics::ClientInfo> client_info(new ::metrics::ClientInfo); |   63   scoped_ptr< ::metrics::ClientInfo> client_info(new ::metrics::ClientInfo); | 
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  263 #endif  // defined(OS_LINUX) |  266 #endif  // defined(OS_LINUX) | 
|  264   metrics_service_->Stop(); |  267   metrics_service_->Stop(); | 
|  265 } |  268 } | 
|  266  |  269  | 
|  267 bool CastMetricsServiceClient::IsReportingEnabled() { |  270 bool CastMetricsServiceClient::IsReportingEnabled() { | 
|  268   return PlatformIsReportingEnabled(cast_service_); |  271   return PlatformIsReportingEnabled(cast_service_); | 
|  269 } |  272 } | 
|  270  |  273  | 
|  271 }  // namespace metrics |  274 }  // namespace metrics | 
|  272 }  // namespace chromecast |  275 }  // namespace chromecast | 
| OLD | NEW |