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

Side by Side Diff: chrome/browser/resources/chromeos/cryptohome.js

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 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 /** 5 /**
6 * Sets |value| to the element specified by |destination_id|. 6 * Sets |value| to the element specified by |destination_id|.
7 * Called from C++ code as a result of RequestCryptohomeProperty() call. 7 * Called from C++ code as a result of RequestCryptohomeProperty() call.
8 * @param {string} destination_id Id of the element to be modified. 8 * @param {string} destination_id Id of the element to be modified.
9 * @param {string} value The value to be set. 9 * @param {string} value The value to be set.
10 */ 10 */
11 function SetCryptohomeProperty(destination_id, value) { 11 function SetCryptohomeProperty(destination_id, value) {
12 $(destination_id).textContent = value; 12 $(destination_id).textContent = value;
13 } 13 }
14 14
15 document.addEventListener('DOMContentLoaded', function() { 15 document.addEventListener('DOMContentLoaded', function() {
16 // Request update. 16 // Request update.
17 chrome.send('pageLoaded'); 17 chrome.send('pageLoaded');
18 18
19 // Auto-refresh when interval is given as pathname. 19 // Auto-refresh when interval is given as pathname.
20 var interval = parseInt(window.location.pathname.split('/')[1]); 20 var interval = parseInt(window.location.pathname.split('/')[1]);
21 if (interval > 0) { 21 if (interval > 0) {
22 $('refresh-message').textContent = 22 $('refresh-message').textContent =
23 '(Auto-refreshing page every ' + interval + 's)'; 23 '(Auto-refreshing page every ' + interval + 's)';
24 setTimeout(function() { window.location.reload(true); }, interval * 1000); 24 setTimeout(function() {
25 window.location.reload(true);
26 }, interval * 1000);
25 } 27 }
26 }); 28 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/choose_mobile_network.js ('k') | chrome/browser/resources/chromeos/drive_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698