| 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 #include "chrome/browser/chromeos/login/screens/eula_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/eula_screen.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 view_->Show(); | 91 view_->Show(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void EulaScreen::Hide() { | 94 void EulaScreen::Hide() { |
| 95 if (view_) | 95 if (view_) |
| 96 view_->Hide(); | 96 view_->Hide(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void EulaScreen::OnUserAction(const std::string& action_id) { | 99 void EulaScreen::OnUserAction(const std::string& action_id) { |
| 100 if (action_id == kUserActionAcceptButtonClicked) | 100 if (action_id == kUserActionAcceptButtonClicked) |
| 101 Finish(BaseScreenDelegate::EULA_ACCEPTED); | 101 Finish(ScreenExitCode::EULA_ACCEPTED); |
| 102 else if (action_id == kUserActionBackButtonClicked) | 102 else if (action_id == kUserActionBackButtonClicked) |
| 103 Finish(BaseScreenDelegate::EULA_BACK); | 103 Finish(ScreenExitCode::EULA_BACK); |
| 104 else | 104 else |
| 105 BaseScreen::OnUserAction(action_id); | 105 BaseScreen::OnUserAction(action_id); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void EulaScreen::OnContextKeyUpdated( | 108 void EulaScreen::OnContextKeyUpdated( |
| 109 const ::login::ScreenContext::KeyType& key) { | 109 const ::login::ScreenContext::KeyType& key) { |
| 110 if (key == kContextKeyUsageStatsEnabled && delegate_) { | 110 if (key == kContextKeyUsageStatsEnabled && delegate_) { |
| 111 delegate_->SetUsageStatisticsReporting( | 111 delegate_->SetUsageStatisticsReporting( |
| 112 context_.GetBoolean(kContextKeyUsageStatsEnabled)); | 112 context_.GetBoolean(kContextKeyUsageStatsEnabled)); |
| 113 } | 113 } |
| 114 } | 114 } |
| 115 | 115 |
| 116 void EulaScreen::OnPasswordFetched(const std::string& tpm_password) { | 116 void EulaScreen::OnPasswordFetched(const std::string& tpm_password) { |
| 117 tpm_password_ = tpm_password; | 117 tpm_password_ = tpm_password; |
| 118 if (view_) | 118 if (view_) |
| 119 view_->OnPasswordFetched(tpm_password_); | 119 view_->OnPasswordFetched(tpm_password_); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace chromeos | 122 } // namespace chromeos |
| OLD | NEW |