Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 100 */ | 100 */ |
| 101 indentityCompare(other) { | 101 indentityCompare(other) { |
| 102 if (this._requestId > other._requestId) | 102 if (this._requestId > other._requestId) |
| 103 return 1; | 103 return 1; |
| 104 if (this._requestId < other._requestId) | 104 if (this._requestId < other._requestId) |
| 105 return -1; | 105 return -1; |
| 106 return 0; | 106 return 0; |
| 107 } | 107 } |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * @return {!Map} | |
| 111 */ | |
| 112 static GetSymbolicToNumericPriority() { | |
|
allada
2016/12/12 17:29:57
NetworkRequest is part of the SDK module. Since th
Oleksii Kadurin
2016/12/12 21:13:15
I see. What do you think would it be a good approa
allada
2016/12/12 23:51:08
Lets just expose: Network.NetworkDataGridNode._sym
| |
| 113 var priorityMap = SDK.NetworkRequest._symbolicToNumericPriority; | |
| 114 if (!priorityMap) { | |
| 115 SDK.NetworkRequest._symbolicToNumericPriority = new Map(); | |
| 116 priorityMap = SDK.NetworkRequest._symbolicToNumericPriority; | |
| 117 priorityMap.set(Protocol.Network.ResourcePriority.VeryLow, 1); | |
| 118 priorityMap.set(Protocol.Network.ResourcePriority.Low, 2); | |
| 119 priorityMap.set(Protocol.Network.ResourcePriority.Medium, 3); | |
| 120 priorityMap.set(Protocol.Network.ResourcePriority.High, 4); | |
| 121 priorityMap.set(Protocol.Network.ResourcePriority.VeryHigh, 5); | |
| 122 } | |
| 123 | |
| 124 return priorityMap; | |
| 125 } | |
| 126 | |
| 127 /** | |
| 110 * @return {!Protocol.Network.RequestId} | 128 * @return {!Protocol.Network.RequestId} |
| 111 */ | 129 */ |
| 112 get requestId() { | 130 get requestId() { |
| 113 return this._requestId; | 131 return this._requestId; |
| 114 } | 132 } |
| 115 | 133 |
| 116 /** | 134 /** |
| 117 * @param {!Protocol.Network.RequestId} requestId | 135 * @param {!Protocol.Network.RequestId} requestId |
| 118 */ | 136 */ |
| 119 set requestId(requestId) { | 137 set requestId(requestId) { |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1222 }; | 1240 }; |
| 1223 | 1241 |
| 1224 /** @typedef {!{type: SDK.NetworkRequest.WebSocketFrameType, time: number, text: string, opCode: number, mask: boolean}} */ | 1242 /** @typedef {!{type: SDK.NetworkRequest.WebSocketFrameType, time: number, text: string, opCode: number, mask: boolean}} */ |
| 1225 SDK.NetworkRequest.WebSocketFrame; | 1243 SDK.NetworkRequest.WebSocketFrame; |
| 1226 | 1244 |
| 1227 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */ | 1245 /** @typedef {!{time: number, eventName: string, eventId: string, data: string}} */ |
| 1228 SDK.NetworkRequest.EventSourceMessage; | 1246 SDK.NetworkRequest.EventSourceMessage; |
| 1229 | 1247 |
| 1230 /** @typedef {!{initiators: !Set<!SDK.NetworkRequest>, initiated: !Set<!SDK.Netw orkRequest>}} */ | 1248 /** @typedef {!{initiators: !Set<!SDK.NetworkRequest>, initiated: !Set<!SDK.Netw orkRequest>}} */ |
| 1231 SDK.NetworkRequest.InitiatorGraph; | 1249 SDK.NetworkRequest.InitiatorGraph; |
| OLD | NEW |