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 16 matching lines...) Expand all Loading... |
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() OVERRIDE; | 34 virtual std::string GetDeviceToken() OVERRIDE; |
35 virtual std::string GetDeviceID() OVERRIDE; | 35 virtual std::string GetDeviceID() OVERRIDE; |
36 virtual std::string GetMachineID() OVERRIDE; | 36 virtual std::string GetMachineID() OVERRIDE; |
| 37 virtual std::string GetMachineModel() OVERRIDE; |
37 virtual em::DeviceRegisterRequest_Type GetPolicyRegisterType() OVERRIDE; | 38 virtual em::DeviceRegisterRequest_Type GetPolicyRegisterType() OVERRIDE; |
38 virtual std::string GetPolicyType() OVERRIDE; | 39 virtual std::string GetPolicyType() OVERRIDE; |
39 virtual bool GetCredentials(std::string* username, | 40 virtual bool GetCredentials(std::string* username, |
40 std::string* auth_token) OVERRIDE; | 41 std::string* auth_token) OVERRIDE; |
41 virtual void OnDeviceTokenAvailable(const std::string& token) OVERRIDE; | 42 virtual void OnDeviceTokenAvailable(const std::string& token) OVERRIDE; |
42 | 43 |
43 private: | 44 private: |
44 class TokenCache; | 45 class TokenCache; |
45 | 46 |
46 // 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 |
(...skipping 28 matching lines...) Expand all Loading... |
75 | 76 |
76 // Allows to construct weak ptrs. | 77 // Allows to construct weak ptrs. |
77 base::WeakPtrFactory<UserPolicyIdentityStrategy> weak_ptr_factory_; | 78 base::WeakPtrFactory<UserPolicyIdentityStrategy> weak_ptr_factory_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(UserPolicyIdentityStrategy); | 80 DISALLOW_COPY_AND_ASSIGN(UserPolicyIdentityStrategy); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace policy | 83 } // namespace policy |
83 | 84 |
84 #endif // CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ | 85 #endif // CHROME_BROWSER_POLICY_USER_POLICY_IDENTITY_STRATEGY_H_ |
OLD | NEW |