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

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

Issue 296003012: [fsp] Introduce chrome://fsp-internals for logging and debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indentation. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/fsp_internals.js
diff --git a/chrome/browser/resources/chromeos/fsp_internals.js b/chrome/browser/resources/chromeos/fsp_internals.js
new file mode 100644
index 0000000000000000000000000000000000000000..db23dee7d2b84b26538985df525cad756a1a79b8
--- /dev/null
+++ b/chrome/browser/resources/chromeos/fsp_internals.js
@@ -0,0 +1,39 @@
+// Copyright 2014 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.
+
+<include src="../../../../third_party/polymer/platform/platform.js">
+<include src="../../../../third_party/polymer/polymer/polymer.js">
+
+// Define the file-systems element.
+Polymer('file-systems', {
+ ready: function() {
+ },
+
+ /**
+ * List of provided file system information maps.
+ * @type {Array.<Object>}
+ */
+ model: []
+});
+
+/*
+ * Updates the mounted file system list.
+ * @param {Object} fileSystems Dictionary containing provided file system
+ * information.
+ *
+ */
+function updateFileSystems(fileSystems) {
+ var mountedFileSystems = document.querySelector('#mounted-file-systems');
+ mountedFileSystems.model = fileSystems;
+ Platform.performMicrotaskCheckpoint();
+}
+
+document.addEventListener('DOMContentLoaded', function() {
+ chrome.send('updateFileSystems');
+
+ // Refresh periodically.
+ setInterval(function() {
+ chrome.send('updateFileSystems');
+ }, 1000);
+});
« no previous file with comments | « chrome/browser/resources/chromeos/fsp_internals.html ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698