| 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 #include "chrome/browser/chromeos/login/eula_screen.h" | 5 #include "chrome/browser/chromeos/login/eula_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/chromeos/cros/cros_library.h" | 8 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 9 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 9 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
| 10 #include "chrome/browser/chromeos/customization_document.h" | 10 #include "chrome/browser/chromeos/customization_document.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return GURL(eula_page); | 51 return GURL(eula_page); |
| 52 | 52 |
| 53 VLOG(1) << "No eula found for locale: " << locale; | 53 VLOG(1) << "No eula found for locale: " << locale; |
| 54 } else { | 54 } else { |
| 55 LOG(ERROR) << "No manifest found."; | 55 LOG(ERROR) << "No manifest found."; |
| 56 } | 56 } |
| 57 return GURL(); | 57 return GURL(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void EulaScreen::OnExit(bool accepted, bool is_usage_stats_checked) { | 60 void EulaScreen::OnExit(bool accepted, bool is_usage_stats_checked) { |
| 61 get_screen_observer()->set_usage_statistics_reporting(is_usage_stats_checked); | 61 get_screen_observer()->SetUsageStatisticsReporting(is_usage_stats_checked); |
| 62 get_screen_observer()->OnExit(accepted | 62 get_screen_observer()->OnExit(accepted |
| 63 ? ScreenObserver::EULA_ACCEPTED | 63 ? ScreenObserver::EULA_ACCEPTED |
| 64 : ScreenObserver::EULA_BACK); | 64 : ScreenObserver::EULA_BACK); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void EulaScreen::InitiatePasswordFetch() { | 67 void EulaScreen::InitiatePasswordFetch() { |
| 68 if (tpm_password_.empty()) { | 68 if (tpm_password_.empty()) { |
| 69 password_fetcher_.Fetch(); | 69 password_fetcher_.Fetch(); |
| 70 // Will call actor after password has been fetched. | 70 // Will call actor after password has been fetched. |
| 71 } else { | 71 } else { |
| 72 actor_->OnPasswordFetched(tpm_password_); | 72 actor_->OnPasswordFetched(tpm_password_); |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 | 75 |
| 76 void EulaScreen::OnPasswordFetched(const std::string& tpm_password) { | 76 void EulaScreen::OnPasswordFetched(const std::string& tpm_password) { |
| 77 tpm_password_ = tpm_password; | 77 tpm_password_ = tpm_password; |
| 78 if (actor_) | 78 if (actor_) |
| 79 actor_->OnPasswordFetched(tpm_password_); | 79 actor_->OnPasswordFetched(tpm_password_); |
| 80 } | 80 } |
| 81 | 81 |
| 82 bool EulaScreen::IsUsageStatsEnabled() const { | 82 bool EulaScreen::IsUsageStatsEnabled() const { |
| 83 return get_screen_observer()->usage_statistics_reporting(); | 83 return get_screen_observer()->GetUsageStatisticsReporting(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void EulaScreen::OnActorDestroyed(EulaScreenActor* actor) { | 86 void EulaScreen::OnActorDestroyed(EulaScreenActor* actor) { |
| 87 if (actor_ == actor) | 87 if (actor_ == actor) |
| 88 actor_ = NULL; | 88 actor_ = NULL; |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace chromeos | 91 } // namespace chromeos |
| OLD | NEW |