{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/196533448","pull_request_review_id":130087013,"id":196533448,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjUzMzQ0OA==","diff_hunk":"@@ -0,0 +1,260 @@\n+/**\n+ * @license Copyright 2018 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+/**\n+ * @fileoverview Fills most of the role of NetworkManager and NetworkRequest classes from DevTools.\n+ * @see https://cs.chromium.org/chromium/src/third_party/blink/renderer/devtools/front_end/sdk/NetworkRequest.js\n+ * @see https://cs.chromium.org/chromium/src/third_party/blink/renderer/devtools/front_end/sdk/NetworkManager.js\n+ */\n+\n+const URL = require('./url-shim');\n+const resourceTypes = require('../../third-party/devtools/ResourceType').TYPES;\n+\n+const SECURE_SCHEMES = ['data', 'https', 'wss', 'blob', 'chrome', 'chrome-extension', 'about'];\n+\n+module.exports = class NetworkRequest {\n+  constructor() {\n+    this.requestId = '';\n+    this._requestId = '';\n+    // TODO(phulce): remove default DevTools connectionId\n+    this.connectionId = '0';\n+    this.connectionReused = false;\n+\n+    this.url = '';\n+    this._url = '';\n+    this.protocol = '';\n+    this.isSecure = false;\n+    this.parsedURL = /** @type {LH.WebInspector.ParsedURL} */ ({scheme: ''});\n+    this.documentURL = '';\n+\n+    this.startTime = -1;\n+    /** @type {number} */\n+    this.endTime = -1;\n+    /** @type {number} */\n+    this._responseReceivedTime = -1;\n+\n+    this.transferSize = 0;\n+    this._resourceSize = 0;\n+    this._fromDiskCache = false;\n+    this._fromMemoryCache = false;\n+\n+    this.finished = false;\n+    this.requestMethod = '';\n+    this.statusCode = -1;\n+    this.redirectSource = /** @type {NetworkRequest|undefined} */ (undefined);\n+    this.redirectDestination = /** @type {NetworkRequest|undefined} */ (undefined);\n+    this.redirects = /** @type {NetworkRequest[]|undefined} */ (undefined);\n+    this.failed = false;\n+    this.localizedFailDescription = '';\n+\n+    this._initiator = /** @type {LH.Crdp.Network.Initiator} */ ({type: 'other'});\n+    this._timing = /** @type {LH.Crdp.Network.ResourceTiming|undefined} */ (undefined);\n+    this._resourceType = /** @type {LH.WebInspector.ResourceType|undefined} */ (undefined);\n+    this._mimeType = '';\n+    this.priority = () => /** @type {LH.Crdp.Network.ResourcePriority} */ ('Low');\n+    this.initiatorRequest = () => /** @type {NetworkRequest|undefined} */ (undefined);\n+    this._responseHeaders = /** @type {LH.WebInspector.HeaderValue[]} */ ([]);\n+\n+    this._fetchedViaServiceWorker = false;\n+    this._frameId = /** @type {string|undefined} */ ('');\n+    this._isLinkPreload = false;\n+\n+    // Make sure we're compatible with old WebInspector.NetworkRequest\n+    // eslint-disable-next-line no-unused-vars\n+    const record = /** @type {LH.WebInspector.NetworkRequest} */ (this);","path":"lighthouse-core/lib/network-request.js","position":68,"original_position":68,"commit_id":"d11d2e77c52b3030156961d7b70df6cef79b57a9","original_commit_id":"d11d2e77c52b3030156961d7b70df6cef79b57a9","user":{"login":"brendankenny","id":316891,"node_id":"MDQ6VXNlcjMxNjg5MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/316891?v=4","gravatar_id":"","url":"https://api.github.com/users/brendankenny","html_url":"https://github.com/brendankenny","followers_url":"https://api.github.com/users/brendankenny/followers","following_url":"https://api.github.com/users/brendankenny/following{/other_user}","gists_url":"https://api.github.com/users/brendankenny/gists{/gist_id}","starred_url":"https://api.github.com/users/brendankenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendankenny/subscriptions","organizations_url":"https://api.github.com/users/brendankenny/orgs","repos_url":"https://api.github.com/users/brendankenny/repos","events_url":"https://api.github.com/users/brendankenny/events{/privacy}","received_events_url":"https://api.github.com/users/brendankenny/received_events","type":"User","site_admin":false},"body":"haha, this is great. Since we don't have `@implements` this could simplify quite a few things...","created_at":"2018-06-19T18:31:19Z","updated_at":"2018-06-19T18:51:23Z","html_url":"https://github.com/GoogleChrome/lighthouse/pull/5451#discussion_r196533448","pull_request_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments/196533448"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/5451#discussion_r196533448"},"pull_request":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451","id":193486016,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNDg2MDE2","html_url":"https://github.com/GoogleChrome/lighthouse/pull/5451","diff_url":"https://github.com/GoogleChrome/lighthouse/pull/5451.diff","patch_url":"https://github.com/GoogleChrome/lighthouse/pull/5451.patch","issue_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/5451","number":5451,"state":"open","locked":false,"title":"core: remove dependency on devtools-frontend NetworkRequest","user":{"login":"patrickhulce","id":2301202,"node_id":"MDQ6VXNlcjIzMDEyMDI=","avatar_url":"https://avatars2.githubusercontent.com/u/2301202?v=4","gravatar_id":"","url":"https://api.github.com/users/patrickhulce","html_url":"https://github.com/patrickhulce","followers_url":"https://api.github.com/users/patrickhulce/followers","following_url":"https://api.github.com/users/patrickhulce/following{/other_user}","gists_url":"https://api.github.com/users/patrickhulce/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickhulce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickhulce/subscriptions","organizations_url":"https://api.github.com/users/patrickhulce/orgs","repos_url":"https://api.github.com/users/patrickhulce/repos","events_url":"https://api.github.com/users/patrickhulce/events{/privacy}","received_events_url":"https://api.github.com/users/patrickhulce/received_events","type":"User","site_admin":false},"body":"title speaks for itself, big change :)\r\n\r\npart of the broader goal of removing our dependency on devtools-frontend\r\n\r\ntests should be passing now! 🎉  I want to do more comparisons with my lantern traces and land our safety checks before this one","created_at":"2018-06-08T01:15:35Z","updated_at":"2018-06-19T18:51:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed3cfe64235edeeb223a26919a2d148c42621f88","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451/commits","review_comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451/comments","review_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/5451/comments","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/d11d2e77c52b3030156961d7b70df6cef79b57a9","head":{"label":"GoogleChrome:standardize_network_req_api","ref":"standardize_network_req_api","sha":"d11d2e77c52b3030156961d7b70df6cef79b57a9","user":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"node_id":"MDEwOlJlcG9zaXRvcnk1MzM3MDk4OA==","name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":"Auditing, performance metrics, and best practices for Progressive Web Apps","fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2018-06-19T15:34:10Z","pushed_at":"2018-06-19T02:01:57Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":"https://developers.google.com/web/tools/lighthouse/","size":23048,"stargazers_count":13827,"watchers_count":13827,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":3429,"mirror_url":null,"archived":false,"open_issues_count":403,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3429,"open_issues":403,"watchers":13827,"default_branch":"master"}},"base":{"label":"GoogleChrome:master","ref":"master","sha":"aeda7c86ea1ff87db78afe6e9bc89e32f2f5ffec","user":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"repo":{"id":53370988,"node_id":"MDEwOlJlcG9zaXRvcnk1MzM3MDk4OA==","name":"lighthouse","full_name":"GoogleChrome/lighthouse","owner":{"login":"GoogleChrome","id":1778935,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzg5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1778935?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleChrome","html_url":"https://github.com/GoogleChrome","followers_url":"https://api.github.com/users/GoogleChrome/followers","following_url":"https://api.github.com/users/GoogleChrome/following{/other_user}","gists_url":"https://api.github.com/users/GoogleChrome/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleChrome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleChrome/subscriptions","organizations_url":"https://api.github.com/users/GoogleChrome/orgs","repos_url":"https://api.github.com/users/GoogleChrome/repos","events_url":"https://api.github.com/users/GoogleChrome/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleChrome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleChrome/lighthouse","description":"Auditing, performance metrics, and best practices for Progressive Web Apps","fork":false,"url":"https://api.github.com/repos/GoogleChrome/lighthouse","forks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/forks","keys_url":"https://api.github.com/repos/GoogleChrome/lighthouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleChrome/lighthouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleChrome/lighthouse/teams","hooks_url":"https://api.github.com/repos/GoogleChrome/lighthouse/hooks","issue_events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleChrome/lighthouse/events","assignees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleChrome/lighthouse/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/tags","blobs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleChrome/lighthouse/languages","stargazers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/stargazers","contributors_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contributors","subscribers_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscribers","subscription_url":"https://api.github.com/repos/GoogleChrome/lighthouse/subscription","commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleChrome/lighthouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleChrome/lighthouse/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleChrome/lighthouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleChrome/lighthouse/merges","archive_url":"https://api.github.com/repos/GoogleChrome/lighthouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleChrome/lighthouse/downloads","issues_url":"https://api.github.com/repos/GoogleChrome/lighthouse/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleChrome/lighthouse/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleChrome/lighthouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleChrome/lighthouse/labels{/name}","releases_url":"https://api.github.com/repos/GoogleChrome/lighthouse/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleChrome/lighthouse/deployments","created_at":"2016-03-08T01:03:11Z","updated_at":"2018-06-19T15:34:10Z","pushed_at":"2018-06-19T02:01:57Z","git_url":"git://github.com/GoogleChrome/lighthouse.git","ssh_url":"git@github.com:GoogleChrome/lighthouse.git","clone_url":"https://github.com/GoogleChrome/lighthouse.git","svn_url":"https://github.com/GoogleChrome/lighthouse","homepage":"https://developers.google.com/web/tools/lighthouse/","size":23048,"stargazers_count":13827,"watchers_count":13827,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":3429,"mirror_url":null,"archived":false,"open_issues_count":403,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3429,"open_issues":403,"watchers":13827,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451"},"html":{"href":"https://github.com/GoogleChrome/lighthouse/pull/5451"},"issue":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/5451"},"comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/issues/5451/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/pulls/5451/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleChrome/lighthouse/statuses/d11d2e77c52b3030156961d7b70df6cef79b57a9"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"brendankenny"}}