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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/eula_screen_handler.cc

Issue 2856683002: cros: Replace "TPM" with "secure module" for machines without TPM. (Closed)
Patch Set: Created 3 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
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/ui/webui/chromeos/login/eula_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/chromeos/login/help_app_launcher.h" 11 #include "chrome/browser/chromeos/login/help_app_launcher.h"
12 #include "chrome/browser/chromeos/login/helper.h" 12 #include "chrome/browser/chromeos/login/helper.h"
13 #include "chrome/browser/chromeos/login/oobe_screen.h" 13 #include "chrome/browser/chromeos/login/oobe_screen.h"
14 #include "chrome/browser/chromeos/login/screens/core_oobe_view.h" 14 #include "chrome/browser/chromeos/login/screens/core_oobe_view.h"
15 #include "chrome/browser/chromeos/login/screens/eula_screen.h" 15 #include "chrome/browser/chromeos/login/screens/eula_screen.h"
16 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h" 16 #include "chrome/browser/chromeos/login/ui/login_web_dialog.h"
17 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 17 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
20 #include "chrome/grit/chromium_strings.h" 20 #include "chrome/grit/chromium_strings.h"
21 #include "chrome/grit/generated_resources.h" 21 #include "chrome/grit/generated_resources.h"
22 #include "chrome/grit/locale_settings.h" 22 #include "chrome/grit/locale_settings.h"
23 #include "chromeos/tpm/tpm_token_info_getter.h"
23 #include "components/login/localized_values_builder.h" 24 #include "components/login/localized_values_builder.h"
24 #include "components/strings/grit/components_strings.h" 25 #include "components/strings/grit/components_strings.h"
25 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
26 #include "rlz/features/features.h" 27 #include "rlz/features/features.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 #include "ui/views/widget/widget.h" 29 #include "ui/views/widget/widget.h"
29 #include "url/gurl.h" 30 #include "url/gurl.h"
30 31
31 namespace { 32 namespace {
32 33
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void EulaScreenHandler::DeclareLocalizedValues( 119 void EulaScreenHandler::DeclareLocalizedValues(
119 ::login::LocalizedValuesBuilder* builder) { 120 ::login::LocalizedValuesBuilder* builder) {
120 builder->Add("eulaScreenTitle", IDS_EULA_SCREEN_TITLE); 121 builder->Add("eulaScreenTitle", IDS_EULA_SCREEN_TITLE);
121 builder->Add("eulaScreenAccessibleTitle", IDS_EULA_SCREEN_ACCESSIBLE_TITLE); 122 builder->Add("eulaScreenAccessibleTitle", IDS_EULA_SCREEN_ACCESSIBLE_TITLE);
122 builder->Add("checkboxLogging", IDS_EULA_CHECKBOX_ENABLE_LOGGING); 123 builder->Add("checkboxLogging", IDS_EULA_CHECKBOX_ENABLE_LOGGING);
123 builder->Add("back", IDS_EULA_BACK_BUTTON); 124 builder->Add("back", IDS_EULA_BACK_BUTTON);
124 builder->Add("next", IDS_EULA_NEXT_BUTTON); 125 builder->Add("next", IDS_EULA_NEXT_BUTTON);
125 builder->Add("acceptAgreement", IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON); 126 builder->Add("acceptAgreement", IDS_EULA_ACCEPT_AND_CONTINUE_BUTTON);
126 builder->Add("eulaSystemInstallationSettings", 127 builder->Add("eulaSystemInstallationSettings",
127 IDS_EULA_SYSTEM_SECURITY_SETTING); 128 IDS_EULA_SYSTEM_SECURITY_SETTING);
128 builder->Add("eulaTpmDesc", IDS_EULA_TPM_DESCRIPTION); 129
129 builder->Add("eulaTpmKeyDesc", IDS_EULA_TPM_KEY_DESCRIPTION); 130 if (TPMTokenInfoGetter::DoesTPMExist()) {
130 builder->Add("eulaTpmDescPowerwash", IDS_EULA_TPM_KEY_DESCRIPTION_POWERWASH); 131 builder->Add("eulaTpmDesc", IDS_EULA_TPM_DESCRIPTION);
131 builder->Add("eulaTpmBusy", IDS_EULA_TPM_BUSY); 132 builder->Add("eulaTpmKeyDesc", IDS_EULA_TPM_KEY_DESCRIPTION);
133 builder->Add("eulaTpmDescPowerwash",
134 IDS_EULA_TPM_KEY_DESCRIPTION_POWERWASH);
135 builder->Add("eulaTpmBusy", IDS_EULA_TPM_BUSY);
136 } else {
137 builder->Add("eulaTpmDesc", IDS_EULA_SECURE_MODULE_DESCRIPTION);
138 builder->Add("eulaTpmKeyDesc", IDS_EULA_SECURE_MODULE_KEY_DESCRIPTION);
139 builder->Add("eulaTpmDescPowerwash",
140 IDS_EULA_SECURE_MODULE_KEY_DESCRIPTION_POWERWASH);
141 builder->Add("eulaTpmBusy", IDS_EULA_SECURE_MODULE_BUSY);
142 }
143
132 builder->Add("eulaSystemInstallationSettingsOkButton", IDS_OK); 144 builder->Add("eulaSystemInstallationSettingsOkButton", IDS_OK);
133 builder->Add("termsOfServiceLoading", IDS_TERMS_OF_SERVICE_SCREEN_LOADING); 145 builder->Add("termsOfServiceLoading", IDS_TERMS_OF_SERVICE_SCREEN_LOADING);
134 #if BUILDFLAG(ENABLE_RLZ) 146 #if BUILDFLAG(ENABLE_RLZ)
135 builder->AddF("eulaRlzDesc", 147 builder->AddF("eulaRlzDesc",
136 IDS_EULA_RLZ_DESCRIPTION, 148 IDS_EULA_RLZ_DESCRIPTION,
137 IDS_SHORT_PRODUCT_NAME, 149 IDS_SHORT_PRODUCT_NAME,
138 IDS_PRODUCT_NAME); 150 IDS_PRODUCT_NAME);
139 builder->AddF("eulaRlzEnable", 151 builder->AddF("eulaRlzEnable",
140 IDS_EULA_RLZ_ENABLE, 152 IDS_EULA_RLZ_ENABLE,
141 IDS_SHORT_PRODUCT_OS_NAME); 153 IDS_SHORT_PRODUCT_OS_NAME);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 IDS_ABOUT_VERSION_LICENSE_EULA, 225 IDS_ABOUT_VERSION_LICENSE_EULA,
214 GURL(chrome::kChromeUICreditsURL)); 226 GURL(chrome::kChromeUICreditsURL));
215 } 227 }
216 228
217 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() { 229 void EulaScreenHandler::HandleOnInstallationSettingsPopupOpened() {
218 if (screen_) 230 if (screen_)
219 screen_->InitiatePasswordFetch(); 231 screen_->InitiatePasswordFetch();
220 } 232 }
221 233
222 } // namespace chromeos 234 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698