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

Unified Diff: appengine_apps/chromium_status/static/js/common/debug.js

Issue 778533003: Moved chromium_status to appengine/ (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years 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: appengine_apps/chromium_status/static/js/common/debug.js
diff --git a/appengine_apps/chromium_status/static/js/common/debug.js b/appengine_apps/chromium_status/static/js/common/debug.js
deleted file mode 100644
index e9b1b081c3c64fe2f0dbde63318ffcb1c62dac76..0000000000000000000000000000000000000000
--- a/appengine_apps/chromium_status/static/js/common/debug.js
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2011 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.
-
-/**
- * Hacky helpers for debugging...
- */
-
-function Log(msg) {
- if (msg) {
- var d = document.getElementById('log');
- if (d) {
- d.appendChild(document.createTextNode(msg + "\n"));
- }
- console.log(msg);
- }
-}
-
-function DumpTimestamp(t) {
- var d = new Date();
- d.setTime(t);
- return d.toLocaleString();
-}
-
-function DumpUTCTimestamp(t) {
- var d = new Date();
- d.setTime(t);
- return d.toUTCString();
-}
-
-function DumpObj(obj, opt_name) {
- if (typeof obj == "string") {
- return "\"" + obj.toString() + "\"";
- }
-
- if (typeof obj != "object") {
- return "" + obj
- }
-
- var str = "";
-
- if (obj instanceof Array) {
- for (var i = 0; i < obj.length; ++i) {
- if (i > 0)
- str += ", ";
- str += DumpObj(obj[i]);
- }
- return "[" + str + "]";
- }
-
- var i = 0;
- for (var key in obj) {
- if (typeof obj[key] == "function") {
- continue;
- }
- if (i > 0)
- str += ", ";
- str += key + ": " + DumpObj(obj[key]);
- i++;
- }
-
- return "{" + str + "}";
-}
-
-function LogRun(run) {
- Log("startTime: " + DumpTimestamp(run.startTime));
- Log("endTime: " + DumpTimestamp(run.GetEndTime()));
- Log("duration (minutes): " + run.duration / (1000 * 60));
- Log("timestamp: " + DumpTimestamp(run.entry.timestamp));
-}
-
-function LogObject(obj, opt_name) {
- var prefix = "";
- if (opt_name)
- prefix = opt_name + "= ";
- Log(prefix + DumpObj(obj));
-}
-

Powered by Google App Engine
This is Rietveld 408576698