| 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_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "base/task.h" | |
| 13 | 12 |
| 14 namespace chromeos { | 13 namespace chromeos { |
| 15 | 14 |
| 16 // Interface which TpmPasswordFetcher uses to notify that password has been | 15 // Interface which TpmPasswordFetcher uses to notify that password has been |
| 17 // fetched. | 16 // fetched. |
| 18 class TpmPasswordFetcherDelegate { | 17 class TpmPasswordFetcherDelegate { |
| 19 public: | 18 public: |
| 20 virtual ~TpmPasswordFetcherDelegate() {} | 19 virtual ~TpmPasswordFetcherDelegate() {} |
| 21 virtual void OnPasswordFetched(const std::string& tpm_password) = 0; | 20 virtual void OnPasswordFetched(const std::string& tpm_password) = 0; |
| 22 }; | 21 }; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 36 private: | 35 private: |
| 37 base::WeakPtrFactory<TpmPasswordFetcher> weak_factory_; | 36 base::WeakPtrFactory<TpmPasswordFetcher> weak_factory_; |
| 38 TpmPasswordFetcherDelegate* delegate_; | 37 TpmPasswordFetcherDelegate* delegate_; |
| 39 | 38 |
| 40 DISALLOW_COPY_AND_ASSIGN(TpmPasswordFetcher); | 39 DISALLOW_COPY_AND_ASSIGN(TpmPasswordFetcher); |
| 41 }; | 40 }; |
| 42 | 41 |
| 43 } // namespace chromeos | 42 } // namespace chromeos |
| 44 | 43 |
| 45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TPM_PASSWORD_FETCHER_H_ |
| OLD | NEW |