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

Unified Diff: chrome/browser/resources/chromeos/cryptohome.js

Issue 10703162: chromeos: Remove CryptohomeLibrary::TpmGetPassword and TpmIsReady (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More localized variables Created 8 years, 5 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/resources/chromeos/cryptohome.html ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/cryptohome.js
diff --git a/chrome/browser/resources/chromeos/cryptohome.js b/chrome/browser/resources/chromeos/cryptohome.js
new file mode 100644
index 0000000000000000000000000000000000000000..40b172045b0369455a9dd4de30bdec5f3bfeeedd
--- /dev/null
+++ b/chrome/browser/resources/chromeos/cryptohome.js
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * Sets |value| to the element specified by |destination_id|.
+ * Called from C++ code as a result of RequestCryptohomeProperty() call.
+ * @param {string} destination_id Id of the element to be modified.
+ * @param {string} value The value to be set.
+ */
+function SetCryptohomeProperty(destination_id, value) {
+ $(destination_id).textContent = value;
+}
+
+document.addEventListener('DOMContentLoaded', function() {
+ // Request update.
+ chrome.send('pageLoaded');
+
+ // Auto-refresh when interval is given as pathname.
+ var interval = parseInt(window.location.pathname.split('/')[1]);
+ if (interval > 0) {
+ $('refresh-message').textContent =
+ '(Auto-refreshing page every ' + interval + 's)';
+ setTimeout(function() { window.location.reload(true); }, interval * 1000);
+ }
+});
« no previous file with comments | « chrome/browser/resources/chromeos/cryptohome.html ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698