| 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/ui/webui/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 output.append("<h3>CryptohomeLibrary:</h3>"); | 528 output.append("<h3>CryptohomeLibrary:</h3>"); |
| 529 output.append("<table>"); | 529 output.append("<table>"); |
| 530 output.append(AddBoolRow("IsMounted", cryptohome->IsMounted())); | 530 output.append(AddBoolRow("IsMounted", cryptohome->IsMounted())); |
| 531 output.append(AddBoolRow("TpmIsReady", cryptohome->TpmIsReady())); | 531 output.append(AddBoolRow("TpmIsReady", cryptohome->TpmIsReady())); |
| 532 output.append(AddBoolRow("TpmIsEnabled", cryptohome->TpmIsEnabled())); | 532 output.append(AddBoolRow("TpmIsEnabled", cryptohome->TpmIsEnabled())); |
| 533 output.append(AddBoolRow("TpmIsOwned", cryptohome->TpmIsOwned())); | 533 output.append(AddBoolRow("TpmIsOwned", cryptohome->TpmIsOwned())); |
| 534 output.append(AddBoolRow("TpmIsBeingOwned", cryptohome->TpmIsBeingOwned())); | 534 output.append(AddBoolRow("TpmIsBeingOwned", cryptohome->TpmIsBeingOwned())); |
| 535 output.append(AddBoolRow("Pkcs11IsTpmTokenReady", is_tpm_token_ready)); | 535 output.append(AddBoolRow("Pkcs11IsTpmTokenReady", is_tpm_token_ready)); |
| 536 output.append("</table>"); | 536 output.append("</table>"); |
| 537 | 537 |
| 538 std::string token_name, user_pin; | |
| 539 crypto::GetTPMTokenInfo(&token_name, &user_pin); | |
| 540 output.append("<h3>crypto:</h3>"); | 538 output.append("<h3>crypto:</h3>"); |
| 541 output.append("<table>"); | 539 output.append("<table>"); |
| 542 output.append(AddBoolRow("IsTPMTokenReady", crypto::IsTPMTokenReady())); | 540 output.append(AddBoolRow("IsTPMTokenReady", crypto::IsTPMTokenReady())); |
| 541 std::string token_name, user_pin; |
| 542 if (crypto::IsTPMTokenReady()) |
| 543 crypto::GetTPMTokenInfo(&token_name, &user_pin); |
| 543 output.append(AddStringRow("token_name", token_name)); | 544 output.append(AddStringRow("token_name", token_name)); |
| 544 output.append(AddStringRow("user_pin", std::string(user_pin.length(), '*'))); | 545 output.append(AddStringRow("user_pin", std::string(user_pin.length(), '*'))); |
| 545 output.append("</table>"); | 546 output.append("</table>"); |
| 546 AppendFooter(&output); | 547 AppendFooter(&output); |
| 547 | 548 |
| 548 source->FinishDataRequest(output, request_id); | 549 source->FinishDataRequest(output, request_id); |
| 549 } | 550 } |
| 550 | 551 |
| 551 void FinishCryptohomeDataRequest(scoped_refptr<AboutUIHTMLSource> source, | 552 void FinishCryptohomeDataRequest(scoped_refptr<AboutUIHTMLSource> source, |
| 552 const std::string& query, | 553 const std::string& query, |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 } | 1402 } |
| 1402 | 1403 |
| 1403 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) | 1404 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) |
| 1404 : WebUIController(web_ui) { | 1405 : WebUIController(web_ui) { |
| 1405 Profile* profile = Profile::FromWebUI(web_ui); | 1406 Profile* profile = Profile::FromWebUI(web_ui); |
| 1406 ChromeURLDataManager::DataSource* source = | 1407 ChromeURLDataManager::DataSource* source = |
| 1407 new AboutUIHTMLSource(name, profile); | 1408 new AboutUIHTMLSource(name, profile); |
| 1408 if (source) | 1409 if (source) |
| 1409 profile->GetChromeURLDataManager()->AddDataSource(source); | 1410 profile->GetChromeURLDataManager()->AddDataSource(source); |
| 1410 } | 1411 } |
| OLD | NEW |