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

Side by Side Diff: chrome/browser/resources/net_internals/log_grouper.js

Issue 10534055: [refactor] Rename some constants in net-internals. Mostly just removes a redundant "Log" prefix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stop adding OWNERS u POS! Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/net_internals/log_util.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * @fileoverview 6 * @fileoverview
7 * LogGroupEntry is a wrapper around log entries, which makes it easier to 7 * LogGroupEntry is a wrapper around log entries, which makes it easier to
8 * find the corresponding start/end of events. 8 * find the corresponding start/end of events.
9 * 9 *
10 * This is used internally by the log and timeline views to pretty print 10 * This is used internally by the log and timeline views to pretty print
11 * collections of log entries. 11 * collections of log entries.
12 */ 12 */
13 13
14 // TODO(eroman): document these methods! 14 // TODO(eroman): document these methods!
15 15
16 var LogGroupEntry = (function() { 16 var LogGroupEntry = (function() {
17 'use strict'; 17 'use strict';
18 18
19 function LogGroupEntry(origEntry, index) { 19 function LogGroupEntry(origEntry, index) {
20 this.orig = origEntry; 20 this.orig = origEntry;
21 this.index = index; 21 this.index = index;
22 } 22 }
23 23
24 LogGroupEntry.prototype = { 24 LogGroupEntry.prototype = {
25 isBegin: function() { 25 isBegin: function() {
26 return this.orig.phase == LogEventPhase.PHASE_BEGIN; 26 return this.orig.phase == EventPhase.PHASE_BEGIN;
27 }, 27 },
28 28
29 isEnd: function() { 29 isEnd: function() {
30 return this.orig.phase == LogEventPhase.PHASE_END; 30 return this.orig.phase == EventPhase.PHASE_END;
31 }, 31 },
32 32
33 getDepth: function() { 33 getDepth: function() {
34 var depth = 0; 34 var depth = 0;
35 var p = this.parentEntry; 35 var p = this.parentEntry;
36 while (p) { 36 while (p) {
37 depth += 1; 37 depth += 1;
38 p = p.parentEntry; 38 p = p.parentEntry;
39 } 39 }
40 return depth; 40 return depth;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 if (groupEntry.isBegin()) 93 if (groupEntry.isBegin())
94 parentStack.push(groupEntry); 94 parentStack.push(groupEntry);
95 } 95 }
96 96
97 return groupedEntries; 97 return groupedEntries;
98 }; 98 };
99 99
100 return LogGroupEntry; 100 return LogGroupEntry;
101 })(); 101 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/net_internals/log_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698