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