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

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

Issue 1547093002: Switch to standard integer types in chrome/browser/chromeos/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 11
10 #include "base/basictypes.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "base/time/time.h" 16 #include "base/time/time.h"
15 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
16 #include "net/base/network_change_notifier.h" 18 #include "net/base/network_change_notifier.h"
17 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" 19 #include "third_party/protobuf/src/google/protobuf/repeated_field.h"
18 20
19 class PrefRegistrySimple; 21 class PrefRegistrySimple;
20 class PrefService; 22 class PrefService;
21 23
22 namespace enterprise_management { 24 namespace enterprise_management {
(...skipping 24 matching lines...) Expand all
47 // Check completed successfully, enrollment not applicable. 49 // Check completed successfully, enrollment not applicable.
48 AUTO_ENROLLMENT_STATE_NO_ENROLLMENT, 50 AUTO_ENROLLMENT_STATE_NO_ENROLLMENT,
49 }; 51 };
50 52
51 // Interacts with the device management service and determines whether this 53 // Interacts with the device management service and determines whether this
52 // machine should automatically enter the Enterprise Enrollment screen during 54 // machine should automatically enter the Enterprise Enrollment screen during
53 // OOBE. 55 // OOBE.
54 class AutoEnrollmentClient 56 class AutoEnrollmentClient
55 : public net::NetworkChangeNotifier::NetworkChangeObserver { 57 : public net::NetworkChangeNotifier::NetworkChangeObserver {
56 public: 58 public:
57 // The modulus value is sent in an int64 field in the protobuf, whose maximum 59 // The modulus value is sent in an int64_t field in the protobuf, whose
58 // value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli and the 60 // maximum value is 2^63-1. So 2^64 and 2^63 can't be represented as moduli
59 // max is 2^62 (when the moduli are restricted to powers-of-2). 61 // and the max is 2^62 (when the moduli are restricted to powers-of-2).
60 static const int kMaximumPower = 62; 62 static const int kMaximumPower = 62;
61 63
62 // Used for signaling progress to a consumer. 64 // Used for signaling progress to a consumer.
63 typedef base::Callback<void(AutoEnrollmentState)> ProgressCallback; 65 typedef base::Callback<void(AutoEnrollmentState)> ProgressCallback;
64 66
65 // |progress_callback| will be invoked whenever some significant event happens 67 // |progress_callback| will be invoked whenever some significant event happens
66 // as part of the protocol, after Start() is invoked. 68 // as part of the protocol, after Start() is invoked.
67 // The result of the protocol will be cached in |local_state|. 69 // The result of the protocol will be cached in |local_state|.
68 // |power_initial| and |power_limit| are exponents of power-of-2 values which 70 // |power_initial| and |power_limit| are exponents of power-of-2 values which
69 // will be the initial modulus and the maximum modulus used by this client. 71 // will be the initial modulus and the maximum modulus used by this client.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 // owner has relinquished ownership. 210 // owner has relinquished ownership.
209 base::Time time_start_; 211 base::Time time_start_;
210 base::Time time_extra_start_; 212 base::Time time_extra_start_;
211 213
212 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient); 214 DISALLOW_COPY_AND_ASSIGN(AutoEnrollmentClient);
213 }; 215 };
214 216
215 } // namespace policy 217 } // namespace policy
216 218
217 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_ 219 #endif // CHROME_BROWSER_CHROMEOS_POLICY_AUTO_ENROLLMENT_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/affiliation_test_helper.cc ('k') | chrome/browser/chromeos/policy/auto_enrollment_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698