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

Unified Diff: chrome/browser/chromeos/login/enterprise_enrollment_view.cc

Issue 6821075: Chrome-side lockbox bindings (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: And now again only my stuff. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/enterprise_enrollment_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/enterprise_enrollment_view.cc
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
index 44c7de5a9810528baeca7234cbffbbf6c6fab88c..afa247e9a69675524db7dc647e5400fbe33fdbec 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_view.cc
@@ -6,6 +6,8 @@
#include "base/json/json_writer.h"
#include "base/values.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
+#include "chrome/browser/chromeos/cros/cryptohome_library.h"
#include "chrome/browser/chromeos/login/enterprise_enrollment_screen.h"
#include "chrome/browser/chromeos/login/helper.h"
#include "chrome/browser/chromeos/login/rounded_rect_painter.h"
@@ -111,6 +113,32 @@ void EnterpriseEnrollmentView::Init() {
}
void EnterpriseEnrollmentView::ShowConfirmationScreen() {
+ if (chromeos::CrosLibrary::Get()->EnsureLoaded()) {
pastarmovj 2011/04/13 15:00:35 This code is here only as an example how to use th
+ chromeos::CryptohomeLibrary* cryptohome = chromeos::CrosLibrary::Get()->GetCryptohomeLibrary();
+ if (cryptohome->TpmIsEnabled() && !cryptohome->TpmIsBeingOwned()) {
+ if (cryptohome->TpmIsOwned()) {
+ cryptohome->TpmClearStoredPassword();
+ } else {
+ cryptohome->TpmCanAttemptOwnership();
+ }
+ }
+ while(cryptohome->TpmIsBeingOwned());
+ LOG(ERROR) << "### FI : " << cryptohome->InstallAttributesIsFirstInstall();
+ LOG(ERROR) << "### count : " << cryptohome->InstallAttributesCount();
+ LOG(ERROR) << "### set : " << cryptohome->InstallAttributesSet("enterprise.owned", "true");
+ LOG(ERROR) << "### set : " << cryptohome->InstallAttributesSet("enterprise.user", user_);
+ LOG(ERROR) << "### count : " << cryptohome->InstallAttributesCount();
+ std::string test;
+ LOG(ERROR) << "### get : " << cryptohome->InstallAttributesGet("enterprise.user", &test);
+ LOG(ERROR) << "### " << test;
+ LOG(ERROR) << "### stat : " << cryptohome->InstallAttributesIsSecure();
+ LOG(ERROR) << "### lock : " << cryptohome->InstallAttributesFinalize();
+ LOG(ERROR) << "### stat : " << cryptohome->InstallAttributesIsSecure();
+ } else {
+ LOG(ERROR) << "Cros library not loaded. "
+ << "We must have disabled the link that led here.";
+ }
+
RenderViewHost* render_view_host =
enrollment_page_view_->tab_contents()->render_view_host();
render_view_host->ExecuteJavascriptInWebFrame(
@@ -147,6 +175,7 @@ void EnterpriseEnrollmentView::OnAuthSubmitted(const std::string& user,
const std::string& password,
const std::string& captcha,
const std::string& access_code) {
+ user_ = user;
controller_->Authenticate(user, password, captcha, access_code);
}
« no previous file with comments | « chrome/browser/chromeos/login/enterprise_enrollment_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698