| 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 18 matching lines...) Expand all Loading... |
| 29 DCHECK(delegate_); | 29 DCHECK(delegate_); |
| 30 if (view_) | 30 if (view_) |
| 31 view_->Bind(*this); | 31 view_->Bind(*this); |
| 32 } | 32 } |
| 33 | 33 |
| 34 EulaScreen::~EulaScreen() { | 34 EulaScreen::~EulaScreen() { |
| 35 if (view_) | 35 if (view_) |
| 36 view_->Unbind(); | 36 view_->Unbind(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 void EulaScreen::PrepareToShow() { | |
| 40 if (view_) | |
| 41 view_->PrepareToShow(); | |
| 42 } | |
| 43 | |
| 44 void EulaScreen::Show() { | 39 void EulaScreen::Show() { |
| 45 // Command to own the TPM. | 40 // Command to own the TPM. |
| 46 DBusThreadManager::Get()->GetCryptohomeClient()->TpmCanAttemptOwnership( | 41 DBusThreadManager::Get()->GetCryptohomeClient()->TpmCanAttemptOwnership( |
| 47 EmptyVoidDBusMethodCallback()); | 42 EmptyVoidDBusMethodCallback()); |
| 48 if (policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == | 43 if (policy::DeviceCloudPolicyManagerChromeOS::GetZeroTouchEnrollmentMode() == |
| 49 policy::ZeroTouchEnrollmentMode::HANDS_OFF) | 44 policy::ZeroTouchEnrollmentMode::HANDS_OFF) |
| 50 OnUserAction(EulaModel::kUserActionAcceptButtonClicked); | 45 OnUserAction(EulaModel::kUserActionAcceptButtonClicked); |
| 51 else if (view_) | 46 else if (view_) |
| 52 view_->Show(); | 47 view_->Show(); |
| 53 } | 48 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 105 |
| 111 void EulaScreen::OnContextKeyUpdated( | 106 void EulaScreen::OnContextKeyUpdated( |
| 112 const ::login::ScreenContext::KeyType& key) { | 107 const ::login::ScreenContext::KeyType& key) { |
| 113 if (key == kContextKeyUsageStatsEnabled && delegate_) { | 108 if (key == kContextKeyUsageStatsEnabled && delegate_) { |
| 114 delegate_->SetUsageStatisticsReporting( | 109 delegate_->SetUsageStatisticsReporting( |
| 115 context_.GetBoolean(kContextKeyUsageStatsEnabled)); | 110 context_.GetBoolean(kContextKeyUsageStatsEnabled)); |
| 116 } | 111 } |
| 117 } | 112 } |
| 118 | 113 |
| 119 } // namespace chromeos | 114 } // namespace chromeos |
| OLD | NEW |