OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |