Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: chrome/browser/chromeos/login/screens/eula_screen.cc

Issue 14179007: Move cryptohome_library to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/cros/cryptohome_library.h"
11 #include "chrome/browser/chromeos/customization_document.h" 9 #include "chrome/browser/chromeos/customization_document.h"
12 #include "chrome/browser/chromeos/login/screens/screen_observer.h" 10 #include "chrome/browser/chromeos/login/screens/screen_observer.h"
13 #include "chrome/browser/chromeos/login/wizard_controller.h" 11 #include "chrome/browser/chromeos/login/wizard_controller.h"
12 #include "chromeos/cryptohome/cryptohome_library.h"
14 13
15 namespace chromeos { 14 namespace chromeos {
16 15
17 EulaScreen::EulaScreen(ScreenObserver* observer, EulaScreenActor* actor) 16 EulaScreen::EulaScreen(ScreenObserver* observer, EulaScreenActor* actor)
18 : WizardScreen(observer), actor_(actor), password_fetcher_(this) { 17 : WizardScreen(observer), actor_(actor), password_fetcher_(this) {
19 DCHECK(actor_); 18 DCHECK(actor_);
20 if (actor_) 19 if (actor_)
21 actor_->SetDelegate(this); 20 actor_->SetDelegate(this);
22 } 21 }
23 22
24 EulaScreen::~EulaScreen() { 23 EulaScreen::~EulaScreen() {
25 if (actor_) 24 if (actor_)
26 actor_->SetDelegate(NULL); 25 actor_->SetDelegate(NULL);
27 } 26 }
28 27
29 void EulaScreen::PrepareToShow() { 28 void EulaScreen::PrepareToShow() {
30 if (actor_) 29 if (actor_)
31 actor_->PrepareToShow(); 30 actor_->PrepareToShow();
32 } 31 }
33 32
34 void EulaScreen::Show() { 33 void EulaScreen::Show() {
35 // Command to own the TPM. 34 // Command to own the TPM.
36 chromeos::CrosLibrary::Get()-> 35 CryptohomeLibrary::Get()->TpmCanAttemptOwnership();
37 GetCryptohomeLibrary()->TpmCanAttemptOwnership();
38 if (actor_) 36 if (actor_)
39 actor_->Show(); 37 actor_->Show();
40 } 38 }
41 39
42 void EulaScreen::Hide() { 40 void EulaScreen::Hide() {
43 if (actor_) 41 if (actor_)
44 actor_->Hide(); 42 actor_->Hide();
45 } 43 }
46 44
47 std::string EulaScreen::GetName() const { 45 std::string EulaScreen::GetName() const {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 bool EulaScreen::IsUsageStatsEnabled() const { 89 bool EulaScreen::IsUsageStatsEnabled() const {
92 return get_screen_observer()->GetUsageStatisticsReporting(); 90 return get_screen_observer()->GetUsageStatisticsReporting();
93 } 91 }
94 92
95 void EulaScreen::OnActorDestroyed(EulaScreenActor* actor) { 93 void EulaScreen::OnActorDestroyed(EulaScreenActor* actor) {
96 if (actor_ == actor) 94 if (actor_ == actor)
97 actor_ = NULL; 95 actor_ = NULL;
98 } 96 }
99 97
100 } // namespace chromeos 98 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698