OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ | 5 #ifndef CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ |
6 #define CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ | 6 #define CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 class UserPolicyIdentityStrategy : public CloudPolicyIdentityStrategy, | 26 class UserPolicyIdentityStrategy : public CloudPolicyIdentityStrategy, |
27 public NotificationObserver { | 27 public NotificationObserver { |
28 public: | 28 public: |
29 UserPolicyIdentityStrategy(Profile* profile, | 29 UserPolicyIdentityStrategy(Profile* profile, |
30 const FilePath& token_cache_file); | 30 const FilePath& token_cache_file); |
31 virtual ~UserPolicyIdentityStrategy(); | 31 virtual ~UserPolicyIdentityStrategy(); |
32 | 32 |
33 // CloudPolicyIdentityStrategy implementation: | 33 // CloudPolicyIdentityStrategy implementation: |
34 virtual std::string GetDeviceToken(); | 34 virtual std::string GetDeviceToken(); |
35 virtual std::string GetDeviceID(); | 35 virtual std::string GetDeviceID(); |
| 36 virtual std::string GetMachineID(); |
| 37 virtual em::DeviceRegisterRequest_Type GetPolicyRegisterType(); |
| 38 virtual std::string GetPolicyType(); |
| 39 |
36 virtual bool GetCredentials(std::string* username, | 40 virtual bool GetCredentials(std::string* username, |
37 std::string* auth_token); | 41 std::string* auth_token); |
38 virtual void OnDeviceTokenAvailable(const std::string& token); | 42 virtual void OnDeviceTokenAvailable(const std::string& token); |
39 | 43 |
40 private: | 44 private: |
41 class TokenCache; | 45 class TokenCache; |
42 | 46 |
43 // Checks whether a new token should be fetched and if so, sends out a | 47 // Checks whether a new token should be fetched and if so, sends out a |
44 // notification. | 48 // notification. |
45 void CheckAndTriggerFetch(); | 49 void CheckAndTriggerFetch(); |
(...skipping 26 matching lines...) Expand all Loading... |
72 | 76 |
73 // Allows to construct weak ptrs. | 77 // Allows to construct weak ptrs. |
74 base::WeakPtrFactory<UserPolicyIdentityStrategy> weak_ptr_factory_; | 78 base::WeakPtrFactory<UserPolicyIdentityStrategy> weak_ptr_factory_; |
75 | 79 |
76 DISALLOW_COPY_AND_ASSIGN(UserPolicyIdentityStrategy); | 80 DISALLOW_COPY_AND_ASSIGN(UserPolicyIdentityStrategy); |
77 }; | 81 }; |
78 | 82 |
79 } // namespace policy | 83 } // namespace policy |
80 | 84 |
81 #endif // CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ | 85 #endif // CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ |
OLD | NEW |