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

Side by Side Diff: content/browser/resources/media/new/goog.js

Issue 20804002: Added the next series of files that go into media-internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed style issues, slightly modified how the media singleton is tested" Created 7 years, 4 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5
6 /**
7 * @fileoverview A placeholder for google closure library functions.
scherkus (not reviewing) 2013/07/29 22:16:28 want to rename this file util.js and introduce hel
Ty Overby 2013/07/29 22:47:22 Done.
8 */
9
10 var goog = {};
11 goog.object = {};
12 goog.object.forEach = function(obj, f, optObj) {
13 'use strict';
14 var key;
15 for (key in obj) {
16 if (obj.hasOwnProperty(key)) {
17 f.call(optObj, obj[key], key, obj);
18 }
19 }
20 };
21
22 goog.time = {};
23 goog.time.millisToString = function(timeMillis) {
scherkus (not reviewing) 2013/07/29 22:16:28 is this function used anywhere yet? if not, pleas
Ty Overby 2013/07/29 22:47:22 Done.
24 'use strict';
25 function pad(num) {
26 num = num.toString();
27 if (num.length < 2) {
28 return '0' + num;
29 }
30 return num;
31 }
32
33 var date = new Date(timeMillis);
34 return pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' +
35 pad(date.getUTCSeconds()) + ' ' + pad((date.getMilliseconds()) % 1000);
36 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698