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

Unified Diff: appengine_apps/chromium_status/static/js/profiling/class_util.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/profiling/class_util.js
diff --git a/appengine_apps/chromium_status/static/js/profiling/class_util.js b/appengine_apps/chromium_status/static/js/profiling/class_util.js
deleted file mode 100644
index 7cafd4c4c8919d29fdac5851697753dbe3302f25..0000000000000000000000000000000000000000
--- a/appengine_apps/chromium_status/static/js/profiling/class_util.js
+++ /dev/null
@@ -1,47 +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.
-
-/**
- * Helper utility functions for manipulating the element classes.
- */
-var ClassUtil = {};
-
-/**
- * Finds an element based on its class name.
- **/
-ClassUtil.FindElementByClassName = function(className) {
- var items = document.getElementsByClassName(className);
- if (items.length != 1) {
- throw "Found " + items.length + " item(s) by class " + className;
- }
- return items[0].id;
-};
-
-/**
- * Resets class type of all items except one.
- **/
-ClassUtil.ResetClass = function(className, specialId, specialClass) {
- var items = document.getElementsByClassName(className);
- var fail = function(msg) {
- throw "Internal error in ResetClass(" + className + ", " + specialId +
- ", " + specialClass + ")\nEnumerated " + items.length + " items.\n" +
- msg;
- }
- var found;
- for (var i in items) {
- var item = items[i];
- if (item.id == specialId) {
- item.className = className + " " + specialClass;
- if (found) {
- fail("Found 2 times");
- }
- found = i;
- } else {
- item.className = className;
- }
- }
- if (!found) {
- fail("Found 0 time");
- }
-};

Powered by Google App Engine
This is Rietveld 408576698