| 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/policy/auto_enrollment_client.h" | 5 #include "chrome/browser/policy/auto_enrollment_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/prefs/pref_registry_simple.h" |
| 15 #include "base/prefs/pref_service.h" |
| 14 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
| 15 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/policy/browser_policy_connector.h" | 18 #include "chrome/browser/policy/browser_policy_connector.h" |
| 17 #include "chrome/browser/policy/device_cloud_policy_manager_chromeos.h" | 19 #include "chrome/browser/policy/device_cloud_policy_manager_chromeos.h" |
| 18 #include "chrome/browser/policy/device_management_service.h" | 20 #include "chrome/browser/policy/device_management_service.h" |
| 19 #include "chrome/browser/prefs/pref_registry_simple.h" | |
| 20 #include "chrome/browser/prefs/pref_service.h" | |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "crypto/sha2.h" | 23 #include "crypto/sha2.h" |
| 24 | 24 |
| 25 namespace em = enterprise_management; | 25 namespace em = enterprise_management; |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // The modulus value is sent in an int64 field in the protobuf, whose maximum | 29 // The modulus value is sent in an int64 field in the protobuf, whose maximum |
| 30 // value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli and the | 30 // value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli and the |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 // This samples |kZero| when there was no need for extra time, so that we can | 328 // This samples |kZero| when there was no need for extra time, so that we can |
| 329 // measure the ratio of users that succeeded without needing a delay to the | 329 // measure the ratio of users that succeeded without needing a delay to the |
| 330 // total users going through OOBE. | 330 // total users going through OOBE. |
| 331 UMA_HISTOGRAM_CUSTOM_TIMES(kExtraTime, delta, kMin, kMax, kBuckets); | 331 UMA_HISTOGRAM_CUSTOM_TIMES(kExtraTime, delta, kMin, kMax, kBuckets); |
| 332 | 332 |
| 333 if (!completion_callback_.is_null()) | 333 if (!completion_callback_.is_null()) |
| 334 completion_callback_.Run(); | 334 completion_callback_.Run(); |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace policy | 337 } // namespace policy |
| OLD | NEW |