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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/HAREntry.js

Issue 1798173003: [DevTools] Added serverIPaddress to HAR output (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 * @return {!Object} 48 * @return {!Object}
49 */ 49 */
50 build: function() 50 build: function()
51 { 51 {
52 var entry = { 52 var entry = {
53 startedDateTime: WebInspector.HARLog.pseudoWallTime(this._request, t his._request.startTime), 53 startedDateTime: WebInspector.HARLog.pseudoWallTime(this._request, t his._request.startTime),
54 time: this._request.timing ? WebInspector.HAREntry._toMilliseconds(t his._request.duration) : 0, 54 time: this._request.timing ? WebInspector.HAREntry._toMilliseconds(t his._request.duration) : 0,
55 request: this._buildRequest(), 55 request: this._buildRequest(),
56 response: this._buildResponse(), 56 response: this._buildResponse(),
57 cache: { }, // Not supported yet. 57 cache: { }, // Not supported yet.
58 timings: this._buildTimings() 58 timings: this._buildTimings(),
59 serverIPAddress: this._request.remoteAddress().split(':')[0]
pfeldman 2016/03/15 00:23:51 ":", also, we'd want a test with this.
59 }; 60 };
60 61
61 if (this._request.connectionId !== "0") 62 if (this._request.connectionId !== "0")
62 entry.connection = this._request.connectionId; 63 entry.connection = this._request.connectionId;
63 var page = this._request.target().networkLog.pageLoadForRequest(this._re quest); 64 var page = this._request.target().networkLog.pageLoadForRequest(this._re quest);
64 if (page) 65 if (page)
65 entry.pageref = "page_" + page.id; 66 entry.pageref = "page_" + page.id;
66 return entry; 67 return entry;
67 }, 68 },
68 69
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 * @return {number} 362 * @return {number}
362 */ 363 */
363 _pageEventTime: function(page, time) 364 _pageEventTime: function(page, time)
364 { 365 {
365 var startTime = page.startTime; 366 var startTime = page.startTime;
366 if (time === -1 || startTime === -1) 367 if (time === -1 || startTime === -1)
367 return -1; 368 return -1;
368 return WebInspector.HAREntry._toMilliseconds(time - startTime); 369 return WebInspector.HAREntry._toMilliseconds(time - startTime);
369 } 370 }
370 } 371 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698