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

Unified 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, 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
Index: content/browser/resources/media/new/goog.js
diff --git a/content/browser/resources/media/new/goog.js b/content/browser/resources/media/new/goog.js
new file mode 100644
index 0000000000000000000000000000000000000000..6137eff22460d28edbfaa7a3c1167d761c58aaac
--- /dev/null
+++ b/content/browser/resources/media/new/goog.js
@@ -0,0 +1,36 @@
+// Copyright (c) 2013 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.
+
+
+/**
+ * @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.
+ */
+
+var goog = {};
+goog.object = {};
+goog.object.forEach = function(obj, f, optObj) {
+ 'use strict';
+ var key;
+ for (key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ f.call(optObj, obj[key], key, obj);
+ }
+ }
+};
+
+goog.time = {};
+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.
+ 'use strict';
+ function pad(num) {
+ num = num.toString();
+ if (num.length < 2) {
+ return '0' + num;
+ }
+ return num;
+ }
+
+ var date = new Date(timeMillis);
+ return pad(date.getUTCHours()) + ':' + pad(date.getUTCMinutes()) + ':' +
+ pad(date.getUTCSeconds()) + ' ' + pad((date.getMilliseconds()) % 1000);
+};

Powered by Google App Engine
This is Rietveld 408576698