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

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

Issue 271533004: Turning on MultiProfile by default for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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/metrics_log_chromeos.h" 5 #include "chrome/browser/metrics/metrics_log_chromeos.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 paired_device->set_vendor_id(device->GetVendorID()); 194 paired_device->set_vendor_id(device->GetVendorID());
195 paired_device->set_product_id(device->GetProductID()); 195 paired_device->set_product_id(device->GetProductID());
196 paired_device->set_device_id(device->GetDeviceID()); 196 paired_device->set_device_id(device->GetDeviceID());
197 } 197 }
198 } 198 }
199 199
200 void MetricsLogChromeOS::UpdateMultiProfileUserCount() { 200 void MetricsLogChromeOS::UpdateMultiProfileUserCount() {
201 metrics::SystemProfileProto* system_profile = 201 metrics::SystemProfileProto* system_profile =
202 uma_proto_->mutable_system_profile(); 202 uma_proto_->mutable_system_profile();
203 203
204 if (chromeos::UserManager::IsInitialized() && 204 if (chromeos::UserManager::IsInitialized()) {
205 chromeos::UserManager::Get()->IsMultipleProfilesAllowed()) {
206 size_t user_count = chromeos::UserManager::Get()->GetLoggedInUsers().size(); 205 size_t user_count = chromeos::UserManager::Get()->GetLoggedInUsers().size();
207 206
208 // We invalidate the user count if it changed while the log was open. 207 // We invalidate the user count if it changed while the log was open.
209 if (system_profile->has_multi_profile_user_count() && 208 if (system_profile->has_multi_profile_user_count() &&
210 user_count != system_profile->multi_profile_user_count()) { 209 user_count != system_profile->multi_profile_user_count()) {
211 user_count = 0; 210 user_count = 0;
212 } 211 }
213 212
214 system_profile->set_multi_profile_user_count(user_count); 213 system_profile->set_multi_profile_user_count(user_count);
215 } 214 }
216 } 215 }
217 216
218 void MetricsLogChromeOS::SetBluetoothAdapter( 217 void MetricsLogChromeOS::SetBluetoothAdapter(
219 scoped_refptr<device::BluetoothAdapter> adapter) { 218 scoped_refptr<device::BluetoothAdapter> adapter) {
220 adapter_ = adapter; 219 adapter_ = adapter;
221 } 220 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698