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

Side by Side Diff: Source/devtools/front_end/network/HAREntry.js

Issue 556363002: DevTools: NetworkRequest: convert connectionId to string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 | Source/devtools/front_end/sdk/NetworkManager.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 /* 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 { 51 {
52 var entry = { 52 var entry = {
53 startedDateTime: new Date(this._request.startTime * 1000), 53 startedDateTime: new Date(this._request.startTime * 1000),
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 }; 59 };
60 60
61 if (this._request.connectionId) 61 if (this._request.connectionId !== "0")
62 entry.connection = String(this._request.connectionId); 62 entry.connection = this._request.connectionId;
63 var page = this._request.target().networkLog.pageLoadForRequest(this._re quest); 63 var page = this._request.target().networkLog.pageLoadForRequest(this._re quest);
64 if (page) 64 if (page)
65 entry.pageref = "page_" + page.id; 65 entry.pageref = "page_" + page.id;
66 return entry; 66 return entry;
67 }, 67 },
68 68
69 /** 69 /**
70 * @return {!Object} 70 * @return {!Object}
71 */ 71 */
72 _buildRequest: function() 72 _buildRequest: function()
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 this._writeProgress.done(); 430 this._writeProgress.done();
431 return; 431 return;
432 } 432 }
433 const chunkSize = 100000; 433 const chunkSize = 100000;
434 var text = this._text.substring(this._bytesWritten, this._bytesWritten + chunkSize); 434 var text = this._text.substring(this._bytesWritten, this._bytesWritten + chunkSize);
435 this._bytesWritten += text.length; 435 this._bytesWritten += text.length;
436 stream.write(text, this._writeNextChunk.bind(this)); 436 stream.write(text, this._writeNextChunk.bind(this));
437 this._writeProgress.setWorked(this._bytesWritten); 437 this._writeProgress.setWorked(this._bytesWritten);
438 } 438 }
439 } 439 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/sdk/NetworkManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698