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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 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
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 var DetailsView = (function() { 5 var DetailsView = (function() {
6 'use strict'; 6 'use strict';
7 7
8 // We inherit from DivView. 8 // We inherit from DivView.
9 var superClass = DivView; 9 var superClass = DivView;
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 for (var i = 0; i < this.sourceEntries_.length; ++i) { 55 for (var i = 0; i < this.sourceEntries_.length; ++i) {
56 if (i != 0) 56 if (i != 0)
57 addNode(node, 'hr'); 57 addNode(node, 'hr');
58 58
59 var sourceEntry = this.sourceEntries_[i]; 59 var sourceEntry = this.sourceEntries_[i];
60 var div = addNode(node, 'div'); 60 var div = addNode(node, 'div');
61 div.className = 'log-source-entry'; 61 div.className = 'log-source-entry';
62 62
63 var p = addNode(div, 'p'); 63 var p = addNode(div, 'p');
64 addNodeWithText( 64 addNodeWithText(
65 p, 'h4', sourceEntry.getSourceId() + ': ' + 65 p, 'h4',
66 sourceEntry.getSourceId() + ': ' +
66 sourceEntry.getSourceTypeString()); 67 sourceEntry.getSourceTypeString());
67 68
68 if (sourceEntry.getDescription()) 69 if (sourceEntry.getDescription())
69 addNodeWithText(p, 'h4', sourceEntry.getDescription()); 70 addNodeWithText(p, 'h4', sourceEntry.getDescription());
70 71
71 var logEntries = sourceEntry.getLogEntries(); 72 var logEntries = sourceEntry.getLogEntries();
72 var startDate = timeutil.convertTimeTicksToDate(logEntries[0].time); 73 var startDate = timeutil.convertTimeTicksToDate(logEntries[0].time);
73 var startTimeDiv = addNodeWithText(p, 'div', 'Start Time: '); 74 var startTimeDiv = addNodeWithText(p, 'div', 'Start Time: ');
74 timeutil.addNodeWithDate(startTimeDiv, startDate); 75 timeutil.addNodeWithDate(startTimeDiv, startDate);
75 76
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 function createSortedCopy_(origArray) { 112 function createSortedCopy_(origArray) {
112 var sortedArray = origArray.slice(0); 113 var sortedArray = origArray.slice(0);
113 sortedArray.sort(function(a, b) { 114 sortedArray.sort(function(a, b) {
114 return a.getSourceId() - b.getSourceId(); 115 return a.getSourceId() - b.getSourceId();
115 }); 116 });
116 return sortedArray; 117 return sortedArray;
117 } 118 }
118 119
119 return DetailsView; 120 return DetailsView;
120 })(); 121 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698