| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // 1) Master key is added with correct label | 28 // 1) Master key is added with correct label |
| 29 // 2) Old supervised user's key is deleted. | 29 // 2) Old supervised user's key is deleted. |
| 30 // 3) Old master key is deleted. | 30 // 3) Old master key is deleted. |
| 31 class ManagerPasswordService | 31 class ManagerPasswordService |
| 32 : public KeyedService, | 32 : public KeyedService, |
| 33 public chromeos::ExtendedAuthenticator::NewAuthStatusConsumer { | 33 public chromeos::ExtendedAuthenticator::NewAuthStatusConsumer { |
| 34 public: | 34 public: |
| 35 ManagerPasswordService(); | 35 ManagerPasswordService(); |
| 36 virtual ~ManagerPasswordService(); | 36 virtual ~ManagerPasswordService(); |
| 37 | 37 |
| 38 virtual void Shutdown() OVERRIDE; | 38 virtual void Shutdown() override; |
| 39 | 39 |
| 40 void Init(const std::string& user_id, | 40 void Init(const std::string& user_id, |
| 41 SupervisedUserSyncService* user_service, | 41 SupervisedUserSyncService* user_service, |
| 42 SupervisedUserSharedSettingsService* service); | 42 SupervisedUserSharedSettingsService* service); |
| 43 | 43 |
| 44 // chromeos::ExtendedAuthenticator::AuthStatusConsumer overrides: | 44 // chromeos::ExtendedAuthenticator::AuthStatusConsumer overrides: |
| 45 virtual void OnAuthenticationFailure(ExtendedAuthenticator::AuthState state) | 45 virtual void OnAuthenticationFailure(ExtendedAuthenticator::AuthState state) |
| 46 OVERRIDE; | 46 override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void OnSharedSettingsChange(const std::string& su_id, const std::string& key); | 49 void OnSharedSettingsChange(const std::string& su_id, const std::string& key); |
| 50 void GetSupervisedUsersCallback( | 50 void GetSupervisedUsersCallback( |
| 51 const std::string& sync_su_id, | 51 const std::string& sync_su_id, |
| 52 const std::string& user_id, | 52 const std::string& user_id, |
| 53 scoped_ptr<base::DictionaryValue> password_data, | 53 scoped_ptr<base::DictionaryValue> password_data, |
| 54 const base::DictionaryValue* supervised_users); | 54 const base::DictionaryValue* supervised_users); |
| 55 void OnAddKeySuccess(const UserContext& master_key_context, | 55 void OnAddKeySuccess(const UserContext& master_key_context, |
| 56 const std::string& user_id, | 56 const std::string& user_id, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 72 | 72 |
| 73 scoped_refptr<ExtendedAuthenticator> authenticator_; | 73 scoped_refptr<ExtendedAuthenticator> authenticator_; |
| 74 | 74 |
| 75 base::WeakPtrFactory<ManagerPasswordService> weak_ptr_factory_; | 75 base::WeakPtrFactory<ManagerPasswordService> weak_ptr_factory_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(ManagerPasswordService); | 77 DISALLOW_COPY_AND_ASSIGN(ManagerPasswordService); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace chromeos | 80 } // namespace chromeos |
| 81 #endif // CHROME_BROWSER_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ | 81 #endif // CHROME_BROWSER_SUPERVISED_USER_CHROMEOS_MANAGER_PASSWORD_SERVICE_H_ |
| OLD | NEW |