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

Side by Side Diff: chrome/browser/metrics/chromeos_metrics_provider.cc

Issue 1102233002: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/media_galleries , metrics and nacl_host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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 "chrome/browser/metrics/chromeos_metrics_provider.h" 5 #include "chrome/browser/metrics/chromeos_metrics_provider.h"
6 6
7 #include "base/prefs/pref_registry_simple.h" 7 #include "base/prefs/pref_registry_simple.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // the UI thread. 170 // the UI thread.
171 content::BrowserThread::PostTaskAndReply( 171 content::BrowserThread::PostTaskAndReply(
172 content::BrowserThread::FILE, 172 content::BrowserThread::FILE,
173 FROM_HERE, 173 FROM_HERE,
174 base::Bind(&ChromeOSMetricsProvider::InitTaskGetHardwareClassOnFileThread, 174 base::Bind(&ChromeOSMetricsProvider::InitTaskGetHardwareClassOnFileThread,
175 weak_ptr_factory_.GetWeakPtr()), 175 weak_ptr_factory_.GetWeakPtr()),
176 callback); 176 callback);
177 } 177 }
178 178
179 void ChromeOSMetricsProvider::InitTaskGetHardwareClassOnFileThread() { 179 void ChromeOSMetricsProvider::InitTaskGetHardwareClassOnFileThread() {
180 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); 180 DCHECK_CURRENTLY_ON(content::BrowserThread::FILE);
181 chromeos::system::StatisticsProvider::GetInstance()->GetMachineStatistic( 181 chromeos::system::StatisticsProvider::GetInstance()->GetMachineStatistic(
182 "hardware_class", &hardware_class_); 182 "hardware_class", &hardware_class_);
183 } 183 }
184 184
185 void ChromeOSMetricsProvider::ProvideSystemProfileMetrics( 185 void ChromeOSMetricsProvider::ProvideSystemProfileMetrics(
186 metrics::SystemProfileProto* system_profile_proto) { 186 metrics::SystemProfileProto* system_profile_proto) {
187 WriteBluetoothProto(system_profile_proto); 187 WriteBluetoothProto(system_profile_proto);
188 UpdateMultiProfileUserCount(system_profile_proto); 188 UpdateMultiProfileUserCount(system_profile_proto);
189 189
190 metrics::SystemProfileProto::Hardware* hardware = 190 metrics::SystemProfileProto::Hardware* hardware =
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 void ChromeOSMetricsProvider::SetBluetoothAdapter( 316 void ChromeOSMetricsProvider::SetBluetoothAdapter(
317 scoped_refptr<device::BluetoothAdapter> adapter) { 317 scoped_refptr<device::BluetoothAdapter> adapter) {
318 adapter_ = adapter; 318 adapter_ = adapter;
319 } 319 }
320 320
321 void ChromeOSMetricsProvider::RecordEnrollmentStatus() { 321 void ChromeOSMetricsProvider::RecordEnrollmentStatus() {
322 UMA_HISTOGRAM_ENUMERATION( 322 UMA_HISTOGRAM_ENUMERATION(
323 "UMA.EnrollmentStatus", GetEnrollmentStatus(), ENROLLMENT_STATUS_MAX); 323 "UMA.EnrollmentStatus", GetEnrollmentStatus(), ENROLLMENT_STATUS_MAX);
324 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/fileapi/native_media_file_util.cc ('k') | chrome/browser/metrics/field_trial_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698