OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 5 |
6 //------------------------------------------------------------------------------ | 6 //------------------------------------------------------------------------------ |
7 // Description of the life cycle of a instance of MetricsService. | 7 // Description of the life cycle of a instance of MetricsService. |
8 // | 8 // |
9 // OVERVIEW | 9 // OVERVIEW |
10 // | 10 // |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 current_log_ = NULL; | 373 current_log_ = NULL; |
374 } | 374 } |
375 } | 375 } |
376 | 376 |
377 void MetricsService::InitializeMetricsState() { | 377 void MetricsService::InitializeMetricsState() { |
378 DCHECK(state_ == INITIALIZED); | 378 DCHECK(state_ == INITIALIZED); |
379 | 379 |
380 thread_ = PlatformThread::CurrentId(); | 380 thread_ = PlatformThread::CurrentId(); |
381 | 381 |
382 user_permits_upload_ = GoogleUpdateSettings::GetCollectStatsConsent(); | 382 user_permits_upload_ = GoogleUpdateSettings::GetCollectStatsConsent(); |
383 user_permits_upload_ = true; | |
384 // Update session ID | 383 // Update session ID |
385 session_id_ = CrashMetricsReporter::GetInstance()->IncrementMetric( | 384 session_id_ = CrashMetricsReporter::GetInstance()->IncrementMetric( |
386 CrashMetricsReporter::SESSION_ID); | 385 CrashMetricsReporter::SESSION_ID); |
387 | 386 |
388 // Ensure that an instance of the StatisticsRecorder object is created. | 387 // Ensure that an instance of the StatisticsRecorder object is created. |
389 g_statistics_recorder_.Get(); | 388 g_statistics_recorder_.Get(); |
390 | 389 |
391 if (user_permits_upload_) { | 390 if (user_permits_upload_) { |
392 // Ensure that an instance of the metrics upload thread is created. | 391 // Ensure that an instance of the metrics upload thread is created. |
393 g_metrics_upload_thread_.Get(); | 392 g_metrics_upload_thread_.Get(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 version += "-F"; | 604 version += "-F"; |
606 if (!version_info.IsOfficialBuild()) | 605 if (!version_info.IsOfficialBuild()) |
607 version.append("-devel"); | 606 version.append("-devel"); |
608 return version; | 607 return version; |
609 } else { | 608 } else { |
610 NOTREACHED() << "Unable to retrieve version string."; | 609 NOTREACHED() << "Unable to retrieve version string."; |
611 } | 610 } |
612 | 611 |
613 return std::string(); | 612 return std::string(); |
614 } | 613 } |
OLD | NEW |