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

Side by Side Diff: chrome/browser/chromeos/policy/auto_enrollment_client.cc

Issue 465413002: Minor cleanup of EnrollmentHandlerChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation for AMD64 Chromium OS. Created 6 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/policy/auto_enrollment_client.h" 5 #include "chrome/browser/chromeos/policy/auto_enrollment_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 em::DeviceStateRetrievalResponse::RestoreMode restore_mode) { 69 em::DeviceStateRetrievalResponse::RestoreMode restore_mode) {
70 switch (restore_mode) { 70 switch (restore_mode) {
71 case em::DeviceStateRetrievalResponse::RESTORE_MODE_NONE: 71 case em::DeviceStateRetrievalResponse::RESTORE_MODE_NONE:
72 return std::string(); 72 return std::string();
73 case em::DeviceStateRetrievalResponse::RESTORE_MODE_REENROLLMENT_REQUESTED: 73 case em::DeviceStateRetrievalResponse::RESTORE_MODE_REENROLLMENT_REQUESTED:
74 return kDeviceStateRestoreModeReEnrollmentRequested; 74 return kDeviceStateRestoreModeReEnrollmentRequested;
75 case em::DeviceStateRetrievalResponse::RESTORE_MODE_REENROLLMENT_ENFORCED: 75 case em::DeviceStateRetrievalResponse::RESTORE_MODE_REENROLLMENT_ENFORCED:
76 return kDeviceStateRestoreModeReEnrollmentEnforced; 76 return kDeviceStateRestoreModeReEnrollmentEnforced;
77 } 77 }
78 78
79 // Return is required to avoid compiler warning.
79 NOTREACHED() << "Bad restore mode " << restore_mode; 80 NOTREACHED() << "Bad restore mode " << restore_mode;
80 return std::string(); 81 return std::string();
81 } 82 }
82 83
83 } // namespace 84 } // namespace
84 85
85 AutoEnrollmentClient::AutoEnrollmentClient( 86 AutoEnrollmentClient::AutoEnrollmentClient(
86 const ProgressCallback& callback, 87 const ProgressCallback& callback,
87 DeviceManagementService* service, 88 DeviceManagementService* service,
88 PrefService* local_state, 89 PrefService* local_state,
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 base::TimeDelta delta = kZero; 444 base::TimeDelta delta = kZero;
444 if (!time_extra_start_.is_null()) 445 if (!time_extra_start_.is_null())
445 delta = now - time_extra_start_; 446 delta = now - time_extra_start_;
446 // This samples |kZero| when there was no need for extra time, so that we can 447 // This samples |kZero| when there was no need for extra time, so that we can
447 // measure the ratio of users that succeeded without needing a delay to the 448 // measure the ratio of users that succeeded without needing a delay to the
448 // total users going through OOBE. 449 // total users going through OOBE.
449 UMA_HISTOGRAM_CUSTOM_TIMES(kUMAExtraTime, delta, kMin, kMax, kBuckets); 450 UMA_HISTOGRAM_CUSTOM_TIMES(kUMAExtraTime, delta, kMin, kMax, kBuckets);
450 } 451 }
451 452
452 } // namespace policy 453 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698