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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 kDeviceStateManagementDomain, | 403 kDeviceStateManagementDomain, |
404 state_response.has_management_domain(), | 404 state_response.has_management_domain(), |
405 new base::StringValue(state_response.management_domain())); | 405 new base::StringValue(state_response.management_domain())); |
406 | 406 |
407 std::string restore_mode = | 407 std::string restore_mode = |
408 ConvertRestoreMode(state_response.restore_mode()); | 408 ConvertRestoreMode(state_response.restore_mode()); |
409 UpdateDict(dict.Get(), | 409 UpdateDict(dict.Get(), |
410 kDeviceStateRestoreMode, | 410 kDeviceStateRestoreMode, |
411 !restore_mode.empty(), | 411 !restore_mode.empty(), |
412 new base::StringValue(restore_mode)); | 412 new base::StringValue(restore_mode)); |
| 413 |
| 414 UpdateDict(dict.Get(), |
| 415 kDeviceStateDisabled, |
| 416 true /* set_or_clear */, |
| 417 new base::FundamentalValue( |
| 418 state_response.has_disabled_state())); |
| 419 UpdateDict(dict.Get(), |
| 420 kDeviceStateDisabledMessage, |
| 421 state_response.has_disabled_state(), |
| 422 new base::StringValue( |
| 423 state_response.disabled_state().message())); |
413 } | 424 } |
414 local_state_->CommitPendingWrite(); | 425 local_state_->CommitPendingWrite(); |
415 device_state_available_ = true; | 426 device_state_available_ = true; |
416 progress = true; | 427 progress = true; |
417 } | 428 } |
418 | 429 |
419 return progress; | 430 return progress; |
420 } | 431 } |
421 | 432 |
422 bool AutoEnrollmentClient::IsIdHashInProtobuf( | 433 bool AutoEnrollmentClient::IsIdHashInProtobuf( |
(...skipping 21 matching lines...) Expand all Loading... |
444 base::TimeDelta delta = kZero; | 455 base::TimeDelta delta = kZero; |
445 if (!time_extra_start_.is_null()) | 456 if (!time_extra_start_.is_null()) |
446 delta = now - time_extra_start_; | 457 delta = now - time_extra_start_; |
447 // This samples |kZero| when there was no need for extra time, so that we can | 458 // This samples |kZero| when there was no need for extra time, so that we can |
448 // measure the ratio of users that succeeded without needing a delay to the | 459 // measure the ratio of users that succeeded without needing a delay to the |
449 // total users going through OOBE. | 460 // total users going through OOBE. |
450 UMA_HISTOGRAM_CUSTOM_TIMES(kUMAExtraTime, delta, kMin, kMax, kBuckets); | 461 UMA_HISTOGRAM_CUSTOM_TIMES(kUMAExtraTime, delta, kMin, kMax, kBuckets); |
451 } | 462 } |
452 | 463 |
453 } // namespace policy | 464 } // namespace policy |
OLD | NEW |