| OLD | NEW |
| 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_LOGIN_SCREENS_EULA_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 EulaScreen(BaseScreenDelegate* base_screen_delegate, | 32 EulaScreen(BaseScreenDelegate* base_screen_delegate, |
| 33 Delegate* delegate, | 33 Delegate* delegate, |
| 34 EulaView* view); | 34 EulaView* view); |
| 35 virtual ~EulaScreen(); | 35 virtual ~EulaScreen(); |
| 36 | 36 |
| 37 // EulaModel implementation: | 37 // EulaModel implementation: |
| 38 virtual void PrepareToShow() override; | 38 virtual void PrepareToShow() override; |
| 39 virtual void Show() override; | 39 virtual void Show() override; |
| 40 virtual void Hide() override; | 40 virtual void Hide() override; |
| 41 virtual GURL GetOemEulaUrl() const override; | 41 virtual GURL GetOemEulaUrl() const override; |
| 42 virtual void OnAcceptButtonClicked() override; | |
| 43 virtual void OnBackButtonClicked() override; | |
| 44 virtual void InitiatePasswordFetch() override; | 42 virtual void InitiatePasswordFetch() override; |
| 45 virtual bool IsUsageStatsEnabled() const override; | 43 virtual bool IsUsageStatsEnabled() const override; |
| 46 virtual void OnViewDestroyed(EulaView* view) override; | 44 virtual void OnViewDestroyed(EulaView* view) override; |
| 45 virtual void OnButtonClicked(const std::string& button_id) override; |
| 47 virtual void OnContextKeyUpdated( | 46 virtual void OnContextKeyUpdated( |
| 48 const ::login::ScreenContext::KeyType& key) override; | 47 const ::login::ScreenContext::KeyType& key) override; |
| 49 | 48 |
| 50 // TpmPasswordFetcherDelegate implementation: | 49 // TpmPasswordFetcherDelegate implementation: |
| 51 virtual void OnPasswordFetched(const std::string& tpm_password) override; | 50 virtual void OnPasswordFetched(const std::string& tpm_password) override; |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 // URL of the OEM EULA page (on disk). | 53 // URL of the OEM EULA page (on disk). |
| 55 GURL oem_eula_page_; | 54 GURL oem_eula_page_; |
| 56 | 55 |
| 57 // TPM password local storage. By convention, we clear the password | 56 // TPM password local storage. By convention, we clear the password |
| 58 // from TPM as soon as we read it. We store it here locally until | 57 // from TPM as soon as we read it. We store it here locally until |
| 59 // EULA screen is closed. | 58 // EULA screen is closed. |
| 60 // TODO(glotov): Sanitize memory used to store password when | 59 // TODO(glotov): Sanitize memory used to store password when |
| 61 // it's destroyed. | 60 // it's destroyed. |
| 62 std::string tpm_password_; | 61 std::string tpm_password_; |
| 63 | 62 |
| 64 Delegate* delegate_; | 63 Delegate* delegate_; |
| 65 | 64 |
| 66 EulaView* view_; | 65 EulaView* view_; |
| 67 | 66 |
| 68 TpmPasswordFetcher password_fetcher_; | 67 TpmPasswordFetcher password_fetcher_; |
| 69 | 68 |
| 70 DISALLOW_COPY_AND_ASSIGN(EulaScreen); | 69 DISALLOW_COPY_AND_ASSIGN(EulaScreen); |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 } // namespace chromeos | 72 } // namespace chromeos |
| 74 | 73 |
| 75 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_H_ | 74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_EULA_SCREEN_H_ |
| OLD | NEW |