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

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

Issue 10096012: [cros] Add Ctrl+Alt+E shortcut to Welcome/EULA screen that cancels update and starts with enrollment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 8 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_screen_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_screen_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698