chrome-devtools-frontend 1.0.976570 → 1.0.977952

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -1
  2. package/front_end/core/host/UserMetrics.ts +46 -24
  3. package/front_end/core/i18n/locales/af.json +5 -5
  4. package/front_end/core/i18n/locales/am.json +5 -5
  5. package/front_end/core/i18n/locales/ar.json +5 -5
  6. package/front_end/core/i18n/locales/as.json +5 -5
  7. package/front_end/core/i18n/locales/az.json +5 -5
  8. package/front_end/core/i18n/locales/be.json +5 -5
  9. package/front_end/core/i18n/locales/bg.json +5 -5
  10. package/front_end/core/i18n/locales/bn.json +5 -5
  11. package/front_end/core/i18n/locales/bs.json +5 -5
  12. package/front_end/core/i18n/locales/ca.json +5 -5
  13. package/front_end/core/i18n/locales/cs.json +5 -5
  14. package/front_end/core/i18n/locales/cy.json +5 -5
  15. package/front_end/core/i18n/locales/da.json +5 -5
  16. package/front_end/core/i18n/locales/de.json +5 -5
  17. package/front_end/core/i18n/locales/el.json +5 -5
  18. package/front_end/core/i18n/locales/en-GB.json +5 -5
  19. package/front_end/core/i18n/locales/en-US.json +24 -15
  20. package/front_end/core/i18n/locales/en-XL.json +24 -15
  21. package/front_end/core/i18n/locales/es-419.json +5 -5
  22. package/front_end/core/i18n/locales/es.json +5 -5
  23. package/front_end/core/i18n/locales/et.json +5 -5
  24. package/front_end/core/i18n/locales/eu.json +5 -5
  25. package/front_end/core/i18n/locales/fa.json +5 -5
  26. package/front_end/core/i18n/locales/fi.json +5 -5
  27. package/front_end/core/i18n/locales/fil.json +5 -5
  28. package/front_end/core/i18n/locales/fr-CA.json +5 -5
  29. package/front_end/core/i18n/locales/fr.json +5 -5
  30. package/front_end/core/i18n/locales/gl.json +5 -5
  31. package/front_end/core/i18n/locales/gu.json +5 -5
  32. package/front_end/core/i18n/locales/he.json +5 -5
  33. package/front_end/core/i18n/locales/hi.json +5 -5
  34. package/front_end/core/i18n/locales/hr.json +5 -5
  35. package/front_end/core/i18n/locales/hu.json +5 -5
  36. package/front_end/core/i18n/locales/hy.json +5 -5
  37. package/front_end/core/i18n/locales/id.json +5 -5
  38. package/front_end/core/i18n/locales/is.json +5 -5
  39. package/front_end/core/i18n/locales/it.json +5 -5
  40. package/front_end/core/i18n/locales/ja.json +5 -5
  41. package/front_end/core/i18n/locales/ka.json +5 -5
  42. package/front_end/core/i18n/locales/kk.json +5 -5
  43. package/front_end/core/i18n/locales/km.json +5 -5
  44. package/front_end/core/i18n/locales/kn.json +5 -5
  45. package/front_end/core/i18n/locales/ko.json +5 -5
  46. package/front_end/core/i18n/locales/ky.json +5 -5
  47. package/front_end/core/i18n/locales/lo.json +5 -5
  48. package/front_end/core/i18n/locales/lt.json +5 -5
  49. package/front_end/core/i18n/locales/lv.json +5 -5
  50. package/front_end/core/i18n/locales/mk.json +5 -5
  51. package/front_end/core/i18n/locales/ml.json +5 -5
  52. package/front_end/core/i18n/locales/mn.json +5 -5
  53. package/front_end/core/i18n/locales/mr.json +5 -5
  54. package/front_end/core/i18n/locales/ms.json +5 -5
  55. package/front_end/core/i18n/locales/my.json +5 -5
  56. package/front_end/core/i18n/locales/ne.json +5 -5
  57. package/front_end/core/i18n/locales/nl.json +5 -5
  58. package/front_end/core/i18n/locales/no.json +5 -5
  59. package/front_end/core/i18n/locales/or.json +5 -5
  60. package/front_end/core/i18n/locales/pa.json +5 -5
  61. package/front_end/core/i18n/locales/pl.json +5 -5
  62. package/front_end/core/i18n/locales/pt-PT.json +5 -5
  63. package/front_end/core/i18n/locales/pt.json +5 -5
  64. package/front_end/core/i18n/locales/ro.json +5 -5
  65. package/front_end/core/i18n/locales/ru.json +5 -5
  66. package/front_end/core/i18n/locales/si.json +5 -5
  67. package/front_end/core/i18n/locales/sk.json +5 -5
  68. package/front_end/core/i18n/locales/sl.json +5 -5
  69. package/front_end/core/i18n/locales/sq.json +5 -5
  70. package/front_end/core/i18n/locales/sr-Latn.json +5 -5
  71. package/front_end/core/i18n/locales/sr.json +5 -5
  72. package/front_end/core/i18n/locales/sv.json +5 -5
  73. package/front_end/core/i18n/locales/sw.json +5 -5
  74. package/front_end/core/i18n/locales/ta.json +5 -5
  75. package/front_end/core/i18n/locales/te.json +5 -5
  76. package/front_end/core/i18n/locales/th.json +5 -5
  77. package/front_end/core/i18n/locales/tr.json +5 -5
  78. package/front_end/core/i18n/locales/uk.json +5 -5
  79. package/front_end/core/i18n/locales/ur.json +5 -5
  80. package/front_end/core/i18n/locales/uz.json +5 -5
  81. package/front_end/core/i18n/locales/vi.json +5 -5
  82. package/front_end/core/i18n/locales/zh-HK.json +5 -5
  83. package/front_end/core/i18n/locales/zh-TW.json +5 -5
  84. package/front_end/core/i18n/locales/zh.json +5 -5
  85. package/front_end/core/i18n/locales/zu.json +5 -5
  86. package/front_end/core/sdk/CSSContainerQuery.ts +1 -1
  87. package/front_end/core/sdk/CSSModel.ts +9 -9
  88. package/front_end/generated/InspectorBackendCommands.js +6 -5
  89. package/front_end/generated/protocol.ts +10 -9
  90. package/front_end/models/issues_manager/{SameSiteCookieIssue.ts → CookieIssue.ts} +75 -79
  91. package/front_end/models/issues_manager/Issue.ts +1 -1
  92. package/front_end/models/issues_manager/IssuesManager.ts +3 -9
  93. package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +1 -1
  94. package/front_end/models/issues_manager/issues_manager.ts +2 -2
  95. package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -4
  96. package/front_end/panels/application/ApplicationPanelCacheSection.ts +3 -0
  97. package/front_end/panels/application/ApplicationPanelSidebar.ts +15 -0
  98. package/front_end/panels/application/InterestGroupTreeElement.ts +2 -0
  99. package/front_end/panels/application/ReportingApiTreeElement.ts +2 -0
  100. package/front_end/panels/application/TrustTokensTreeElement.ts +2 -0
  101. package/front_end/panels/application/components/BackForwardCacheView.ts +23 -1
  102. package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
  103. package/front_end/panels/elements/ComputedStyleModel.ts +1 -1
  104. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  105. package/front_end/panels/elements/LayersWidget.ts +1 -1
  106. package/front_end/panels/elements/MetricsSidebarPane.ts +2 -2
  107. package/front_end/panels/elements/PlatformFontsWidget.ts +1 -1
  108. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
  109. package/front_end/panels/elements/StylesSidebarPane.ts +2 -3
  110. package/front_end/panels/emulation/MediaQueryInspector.ts +1 -1
  111. package/front_end/panels/issues/IssueView.ts +1 -1
  112. package/front_end/panels/issues/IssuesPane.ts +1 -1
  113. package/front_end/panels/network/NetworkLogView.ts +1 -1
  114. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  115. package/front_end/panels/sources/SourcesView.ts +23 -10
  116. package/front_end/panels/sources/components/HeadersView.css +84 -0
  117. package/front_end/panels/sources/components/HeadersView.ts +300 -0
  118. package/front_end/panels/sources/components/components.ts +9 -0
  119. package/front_end/panels/timeline/TimelineController.ts +17 -5
  120. package/front_end/ui/components/expandable_list/expandableList.css +10 -0
  121. package/front_end/ui/components/text_editor/javascript.ts +46 -1
  122. package/package.json +1 -1
@@ -265,12 +265,12 @@ export class CSSModel extends SDKModel<EventTypes> {
265
265
  await this.agent.invoke_stopRuleUsageTracking();
266
266
  }
267
267
 
268
- async mediaQueriesPromise(): Promise<CSSMedia[]> {
268
+ async getMediaQueries(): Promise<CSSMedia[]> {
269
269
  const {medias} = await this.agent.invoke_getMediaQueries();
270
270
  return medias ? CSSMedia.parseMediaArrayPayload(this, medias) : [];
271
271
  }
272
272
 
273
- async rootLayerPromise(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.CSSLayerData> {
273
+ async getRootLayer(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.CSSLayerData> {
274
274
  const {rootLayer} = await this.agent.invoke_getLayersForNode({nodeId});
275
275
  return rootLayer;
276
276
  }
@@ -288,7 +288,7 @@ export class CSSModel extends SDKModel<EventTypes> {
288
288
  this.dispatchEventToListeners(Events.ModelWasEnabled);
289
289
  }
290
290
 
291
- async matchedStylesPromise(nodeId: Protocol.DOM.NodeId): Promise<CSSMatchedStyles|null> {
291
+ async getMatchedStyles(nodeId: Protocol.DOM.NodeId): Promise<CSSMatchedStyles|null> {
292
292
  const response = await this.agent.invoke_getMatchedStylesForNode({nodeId});
293
293
 
294
294
  if (response.getError()) {
@@ -306,16 +306,16 @@ export class CSSModel extends SDKModel<EventTypes> {
306
306
  response.cssKeyframesRules || []);
307
307
  }
308
308
 
309
- async classNamesPromise(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string[]> {
309
+ async getClassNames(styleSheetId: Protocol.CSS.StyleSheetId): Promise<string[]> {
310
310
  const {classNames} = await this.agent.invoke_collectClassNames({styleSheetId});
311
311
  return classNames || [];
312
312
  }
313
313
 
314
- computedStylePromise(nodeId: Protocol.DOM.NodeId): Promise<Map<string, string>|null> {
314
+ getComputedStyle(nodeId: Protocol.DOM.NodeId): Promise<Map<string, string>|null> {
315
315
  return this.#styleLoader.computedStylePromise(nodeId);
316
316
  }
317
317
 
318
- async backgroundColorsPromise(nodeId: Protocol.DOM.NodeId): Promise<ContrastInfo|null> {
318
+ async getBackgroundColors(nodeId: Protocol.DOM.NodeId): Promise<ContrastInfo|null> {
319
319
  const response = await this.agent.invoke_getBackgroundColors({nodeId});
320
320
  if (response.getError()) {
321
321
  return null;
@@ -328,7 +328,7 @@ export class CSSModel extends SDKModel<EventTypes> {
328
328
  };
329
329
  }
330
330
 
331
- async platformFontsPromise(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.PlatformFontUsage[]|null> {
331
+ async getPlatformFonts(nodeId: Protocol.DOM.NodeId): Promise<Protocol.CSS.PlatformFontUsage[]|null> {
332
332
  const {fonts} = await this.agent.invoke_getPlatformFontsForNode({nodeId});
333
333
  return fonts;
334
334
  }
@@ -349,7 +349,7 @@ export class CSSModel extends SDKModel<EventTypes> {
349
349
  return values;
350
350
  }
351
351
 
352
- async inlineStylesPromise(nodeId: Protocol.DOM.NodeId): Promise<InlineStyleResult|null> {
352
+ async getInlineStyles(nodeId: Protocol.DOM.NodeId): Promise<InlineStyleResult|null> {
353
353
  const response = await this.agent.invoke_getInlineStylesForNode({nodeId});
354
354
 
355
355
  if (response.getError() || !response.inlineStyle) {
@@ -702,7 +702,7 @@ export class CSSModel extends SDKModel<EventTypes> {
702
702
  this.#cachedMatchedCascadeNode = node;
703
703
  if (!this.#cachedMatchedCascadePromise) {
704
704
  if (node.id) {
705
- this.#cachedMatchedCascadePromise = this.matchedStylesPromise(node.id);
705
+ this.#cachedMatchedCascadePromise = this.getMatchedStyles(node.id);
706
706
  } else {
707
707
  return Promise.resolve(null);
708
708
  }
@@ -182,7 +182,7 @@ export function registerCommands(inspectorBackend) {
182
182
  []);
183
183
 
184
184
  // Audits.
185
- inspectorBackend.registerEnum('Audits.SameSiteCookieExclusionReason', {
185
+ inspectorBackend.registerEnum('Audits.CookieExclusionReason', {
186
186
  ExcludeSameSiteUnspecifiedTreatedAsLax: 'ExcludeSameSiteUnspecifiedTreatedAsLax',
187
187
  ExcludeSameSiteNoneInsecure: 'ExcludeSameSiteNoneInsecure',
188
188
  ExcludeSameSiteLax: 'ExcludeSameSiteLax',
@@ -190,7 +190,7 @@ export function registerCommands(inspectorBackend) {
190
190
  ExcludeInvalidSameParty: 'ExcludeInvalidSameParty',
191
191
  ExcludeSamePartyCrossPartyContext: 'ExcludeSamePartyCrossPartyContext'
192
192
  });
193
- inspectorBackend.registerEnum('Audits.SameSiteCookieWarningReason', {
193
+ inspectorBackend.registerEnum('Audits.CookieWarningReason', {
194
194
  WarnSameSiteUnspecifiedCrossSiteContext: 'WarnSameSiteUnspecifiedCrossSiteContext',
195
195
  WarnSameSiteNoneInsecure: 'WarnSameSiteNoneInsecure',
196
196
  WarnSameSiteUnspecifiedLaxAllowUnsafe: 'WarnSameSiteUnspecifiedLaxAllowUnsafe',
@@ -198,9 +198,10 @@ export function registerCommands(inspectorBackend) {
198
198
  WarnSameSiteStrictCrossDowngradeStrict: 'WarnSameSiteStrictCrossDowngradeStrict',
199
199
  WarnSameSiteStrictCrossDowngradeLax: 'WarnSameSiteStrictCrossDowngradeLax',
200
200
  WarnSameSiteLaxCrossDowngradeStrict: 'WarnSameSiteLaxCrossDowngradeStrict',
201
- WarnSameSiteLaxCrossDowngradeLax: 'WarnSameSiteLaxCrossDowngradeLax'
201
+ WarnSameSiteLaxCrossDowngradeLax: 'WarnSameSiteLaxCrossDowngradeLax',
202
+ WarnAttributeValueExceedsMaxSize: 'WarnAttributeValueExceedsMaxSize'
202
203
  });
203
- inspectorBackend.registerEnum('Audits.SameSiteCookieOperation', {SetCookie: 'SetCookie', ReadCookie: 'ReadCookie'});
204
+ inspectorBackend.registerEnum('Audits.CookieOperation', {SetCookie: 'SetCookie', ReadCookie: 'ReadCookie'});
204
205
  inspectorBackend.registerEnum('Audits.MixedContentResolutionStatus', {
205
206
  MixedContentBlocked: 'MixedContentBlocked',
206
207
  MixedContentAutomaticallyUpgraded: 'MixedContentAutomaticallyUpgraded',
@@ -301,7 +302,7 @@ export function registerCommands(inspectorBackend) {
301
302
  Canceled: 'Canceled'
302
303
  });
303
304
  inspectorBackend.registerEnum('Audits.InspectorIssueCode', {
304
- SameSiteCookieIssue: 'SameSiteCookieIssue',
305
+ CookieIssue: 'CookieIssue',
305
306
  MixedContentIssue: 'MixedContentIssue',
306
307
  BlockedByResponseIssue: 'BlockedByResponseIssue',
307
308
  HeavyAdIssue: 'HeavyAdIssue',
@@ -696,7 +696,7 @@ export namespace Audits {
696
696
  frameId: Page.FrameId;
697
697
  }
698
698
 
699
- export const enum SameSiteCookieExclusionReason {
699
+ export const enum CookieExclusionReason {
700
700
  ExcludeSameSiteUnspecifiedTreatedAsLax = 'ExcludeSameSiteUnspecifiedTreatedAsLax',
701
701
  ExcludeSameSiteNoneInsecure = 'ExcludeSameSiteNoneInsecure',
702
702
  ExcludeSameSiteLax = 'ExcludeSameSiteLax',
@@ -705,7 +705,7 @@ export namespace Audits {
705
705
  ExcludeSamePartyCrossPartyContext = 'ExcludeSamePartyCrossPartyContext',
706
706
  }
707
707
 
708
- export const enum SameSiteCookieWarningReason {
708
+ export const enum CookieWarningReason {
709
709
  WarnSameSiteUnspecifiedCrossSiteContext = 'WarnSameSiteUnspecifiedCrossSiteContext',
710
710
  WarnSameSiteNoneInsecure = 'WarnSameSiteNoneInsecure',
711
711
  WarnSameSiteUnspecifiedLaxAllowUnsafe = 'WarnSameSiteUnspecifiedLaxAllowUnsafe',
@@ -714,9 +714,10 @@ export namespace Audits {
714
714
  WarnSameSiteStrictCrossDowngradeLax = 'WarnSameSiteStrictCrossDowngradeLax',
715
715
  WarnSameSiteLaxCrossDowngradeStrict = 'WarnSameSiteLaxCrossDowngradeStrict',
716
716
  WarnSameSiteLaxCrossDowngradeLax = 'WarnSameSiteLaxCrossDowngradeLax',
717
+ WarnAttributeValueExceedsMaxSize = 'WarnAttributeValueExceedsMaxSize',
717
718
  }
718
719
 
719
- export const enum SameSiteCookieOperation {
720
+ export const enum CookieOperation {
720
721
  SetCookie = 'SetCookie',
721
722
  ReadCookie = 'ReadCookie',
722
723
  }
@@ -726,7 +727,7 @@ export namespace Audits {
726
727
  * time finding a specific cookie. With this, we can convey specific error
727
728
  * information without the cookie.
728
729
  */
729
- export interface SameSiteCookieIssueDetails {
730
+ export interface CookieIssueDetails {
730
731
  /**
731
732
  * If AffectedCookie is not set then rawCookieLine contains the raw
732
733
  * Set-Cookie header string. This hints at a problem where the
@@ -735,13 +736,13 @@ export namespace Audits {
735
736
  */
736
737
  cookie?: AffectedCookie;
737
738
  rawCookieLine?: string;
738
- cookieWarningReasons: SameSiteCookieWarningReason[];
739
- cookieExclusionReasons: SameSiteCookieExclusionReason[];
739
+ cookieWarningReasons: CookieWarningReason[];
740
+ cookieExclusionReasons: CookieExclusionReason[];
740
741
  /**
741
742
  * Optionally identifies the site-for-cookies and the cookie url, which
742
743
  * may be used by the front-end as additional context.
743
744
  */
744
- operation: SameSiteCookieOperation;
745
+ operation: CookieOperation;
745
746
  siteForCookies?: string;
746
747
  cookieUrl?: string;
747
748
  request?: AffectedRequest;
@@ -1096,7 +1097,7 @@ export namespace Audits {
1096
1097
  * information about the kind of issue.
1097
1098
  */
1098
1099
  export const enum InspectorIssueCode {
1099
- SameSiteCookieIssue = 'SameSiteCookieIssue',
1100
+ CookieIssue = 'CookieIssue',
1100
1101
  MixedContentIssue = 'MixedContentIssue',
1101
1102
  BlockedByResponseIssue = 'BlockedByResponseIssue',
1102
1103
  HeavyAdIssue = 'HeavyAdIssue',
@@ -1120,7 +1121,7 @@ export namespace Audits {
1120
1121
  * add a new optional field to this type.
1121
1122
  */
1122
1123
  export interface InspectorIssueDetails {
1123
- sameSiteCookieIssueDetails?: SameSiteCookieIssueDetails;
1124
+ cookieIssueDetails?: CookieIssueDetails;
1124
1125
  mixedContentIssueDetails?: MixedContentIssueDetails;
1125
1126
  blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
1126
1127
  heavyAdIssueDetails?: HeavyAdIssueDetails;
@@ -34,15 +34,14 @@ const UIStrings = {
34
34
  */
35
35
  firstPartySetsExplained: '`First-Party Sets` and the `SameParty` attribute',
36
36
  };
37
- const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SameSiteCookieIssue.ts', UIStrings);
37
+ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
38
38
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
39
39
 
40
- export class SameSiteCookieIssue extends Issue {
41
- #issueDetails: Protocol.Audits.SameSiteCookieIssueDetails;
40
+ export class CookieIssue extends Issue {
41
+ #issueDetails: Protocol.Audits.CookieIssueDetails;
42
42
 
43
43
  constructor(
44
- code: string, issueDetails: Protocol.Audits.SameSiteCookieIssueDetails,
45
- issuesModel: SDK.IssuesModel.IssuesModel) {
44
+ code: string, issueDetails: Protocol.Audits.CookieIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
46
45
  super(code, issuesModel);
47
46
  this.#issueDetails = issueDetails;
48
47
  }
@@ -62,35 +61,34 @@ export class SameSiteCookieIssue extends Issue {
62
61
  }
63
62
 
64
63
  /**
65
- * Returns an array of issues from a given SameSiteCookieIssueDetails.
64
+ * Returns an array of issues from a given CookieIssueDetails.
66
65
  */
67
- static createIssuesFromSameSiteDetails(
68
- sameSiteDetails: Protocol.Audits.SameSiteCookieIssueDetails,
69
- issuesModel: SDK.IssuesModel.IssuesModel): SameSiteCookieIssue[] {
70
- const issues: SameSiteCookieIssue[] = [];
66
+ static createIssuesFromCookieIssueDetails(
67
+ cookieIssueDetails: Protocol.Audits.CookieIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel): CookieIssue[] {
68
+ const issues: CookieIssue[] = [];
71
69
 
72
70
  // Exclusion reasons have priority. It means a cookie was blocked. Create an issue
73
71
  // for every exclusion reason but ignore warning reasons if the cookie was blocked.
74
72
  // Some exclusion reasons are dependent on warning reasons existing in order to produce an issue.
75
- if (sameSiteDetails.cookieExclusionReasons && sameSiteDetails.cookieExclusionReasons.length > 0) {
76
- for (const exclusionReason of sameSiteDetails.cookieExclusionReasons) {
77
- const code = SameSiteCookieIssue.codeForSameSiteDetails(
78
- exclusionReason, sameSiteDetails.cookieWarningReasons, sameSiteDetails.operation,
79
- sameSiteDetails.cookieUrl);
73
+ if (cookieIssueDetails.cookieExclusionReasons && cookieIssueDetails.cookieExclusionReasons.length > 0) {
74
+ for (const exclusionReason of cookieIssueDetails.cookieExclusionReasons) {
75
+ const code = CookieIssue.codeForCookieIssueDetails(
76
+ exclusionReason, cookieIssueDetails.cookieWarningReasons, cookieIssueDetails.operation,
77
+ cookieIssueDetails.cookieUrl);
80
78
  if (code) {
81
- issues.push(new SameSiteCookieIssue(code, sameSiteDetails, issuesModel));
79
+ issues.push(new CookieIssue(code, cookieIssueDetails, issuesModel));
82
80
  }
83
81
  }
84
82
  return issues;
85
83
  }
86
84
 
87
- if (sameSiteDetails.cookieWarningReasons) {
88
- for (const warningReason of sameSiteDetails.cookieWarningReasons) {
85
+ if (cookieIssueDetails.cookieWarningReasons) {
86
+ for (const warningReason of cookieIssueDetails.cookieWarningReasons) {
89
87
  // warningReasons should be an empty array here.
90
- const code = SameSiteCookieIssue.codeForSameSiteDetails(
91
- warningReason, [], sameSiteDetails.operation, sameSiteDetails.cookieUrl);
88
+ const code = CookieIssue.codeForCookieIssueDetails(
89
+ warningReason, [], cookieIssueDetails.operation, cookieIssueDetails.cookieUrl);
92
90
  if (code) {
93
- issues.push(new SameSiteCookieIssue(code, sameSiteDetails, issuesModel));
91
+ issues.push(new CookieIssue(code, cookieIssueDetails, issuesModel));
94
92
  }
95
93
  }
96
94
  }
@@ -99,36 +97,35 @@ export class SameSiteCookieIssue extends Issue {
99
97
 
100
98
  /**
101
99
  * Calculates an issue code from a reason, an operation, and an array of warningReasons. All these together
102
- * can uniquely identify a specific SameSite cookie issue.
103
- * warningReasons is only needed for some SameSiteCookieExclusionReason in order to determine if an issue should be raised.
104
- * It is not required if reason is a SameSiteCookieWarningReason.
100
+ * can uniquely identify a specific cookie issue.
101
+ * warningReasons is only needed for some CookieExclusionReason in order to determine if an issue should be raised.
102
+ * It is not required if reason is a CookieWarningReason.
105
103
  */
106
- static codeForSameSiteDetails(
107
- reason: Protocol.Audits.SameSiteCookieExclusionReason|Protocol.Audits.SameSiteCookieWarningReason,
108
- warningReasons: Protocol.Audits.SameSiteCookieWarningReason[], operation: Protocol.Audits.SameSiteCookieOperation,
104
+ static codeForCookieIssueDetails(
105
+ reason: Protocol.Audits.CookieExclusionReason|Protocol.Audits.CookieWarningReason,
106
+ warningReasons: Protocol.Audits.CookieWarningReason[], operation: Protocol.Audits.CookieOperation,
109
107
  cookieUrl?: string): string|null {
110
108
  const isURLSecure = cookieUrl && (cookieUrl.startsWith('https://') || cookieUrl.startsWith('wss://'));
111
109
  const secure = isURLSecure ? 'Secure' : 'Insecure';
112
110
 
113
- if (reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteStrict ||
114
- reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteLax ||
115
- reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
111
+ if (reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteStrict ||
112
+ reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteLax ||
113
+ reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
116
114
  if (warningReasons && warningReasons.length > 0) {
117
- if (warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict)) {
115
+ if (warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict)) {
118
116
  return [
119
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
117
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
120
118
  'ExcludeNavigationContextDowngrade',
121
119
  secure,
122
120
  ].join('::');
123
121
  }
124
122
 
125
- if (warningReasons.includes(
126
- Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict) ||
127
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeLax) ||
128
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) ||
129
- warningReasons.includes(Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeLax)) {
123
+ if (warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict) ||
124
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeLax) ||
125
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) ||
126
+ warningReasons.includes(Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeLax)) {
130
127
  return [
131
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
128
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
132
129
  'ExcludeContextDowngrade',
133
130
  operation,
134
131
  secure,
@@ -138,8 +135,8 @@ export class SameSiteCookieIssue extends Issue {
138
135
 
139
136
  // If we have ExcludeSameSiteUnspecifiedTreatedAsLax but no corresponding warnings, then add just
140
137
  // the Issue code for ExcludeSameSiteUnspecifiedTreatedAsLax.
141
- if (reason === Protocol.Audits.SameSiteCookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
142
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, operation].join('::');
138
+ if (reason === Protocol.Audits.CookieExclusionReason.ExcludeSameSiteUnspecifiedTreatedAsLax) {
139
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, operation].join('::');
143
140
  }
144
141
 
145
142
  // ExcludeSameSiteStrict and ExcludeSameSiteLax require being paired with an appropriate warning. We didn't
@@ -147,18 +144,17 @@ export class SameSiteCookieIssue extends Issue {
147
144
  return null;
148
145
  }
149
146
 
150
- if (reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict) {
151
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, secure].join('::');
147
+ if (reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictLaxDowngradeStrict) {
148
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, secure].join('::');
152
149
  }
153
150
  // These have the same message.
154
- if (reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict ||
155
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteStrictCrossDowngradeLax ||
156
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeLax ||
157
- reason === Protocol.Audits.SameSiteCookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) {
158
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, 'WarnCrossDowngrade', operation, secure].join(
159
- '::');
151
+ if (reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeStrict ||
152
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteStrictCrossDowngradeLax ||
153
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeLax ||
154
+ reason === Protocol.Audits.CookieWarningReason.WarnSameSiteLaxCrossDowngradeStrict) {
155
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, 'WarnCrossDowngrade', operation, secure].join('::');
160
156
  }
161
- return [Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue, reason, operation].join('::');
157
+ return [Protocol.Audits.InspectorIssueCode.CookieIssue, reason, operation].join('::');
162
158
  }
163
159
 
164
160
  cookies(): Iterable<Protocol.Audits.AffectedCookie> {
@@ -183,7 +179,7 @@ export class SameSiteCookieIssue extends Issue {
183
179
  }
184
180
 
185
181
  getCategory(): IssueCategory {
186
- return IssueCategory.SameSiteCookie;
182
+ return IssueCategory.Cookie;
187
183
  }
188
184
 
189
185
  getDescription(): MarkdownIssueDescription|null {
@@ -207,14 +203,14 @@ export class SameSiteCookieIssue extends Issue {
207
203
  }
208
204
 
209
205
  static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
210
- SameSiteCookieIssue[] {
211
- const sameSiteDetails = inspectorIssue.details.sameSiteCookieIssueDetails;
212
- if (!sameSiteDetails) {
213
- console.warn('SameSite issue without details received.');
206
+ CookieIssue[] {
207
+ const cookieIssueDetails = inspectorIssue.details.cookieIssueDetails;
208
+ if (!cookieIssueDetails) {
209
+ console.warn('Cookie issue without details received.');
214
210
  return [];
215
211
  }
216
212
 
217
- return SameSiteCookieIssue.createIssuesFromSameSiteDetails(sameSiteDetails, issuesModel);
213
+ return CookieIssue.createIssuesFromCookieIssueDetails(cookieIssueDetails, issuesModel);
218
214
  }
219
215
  }
220
216
 
@@ -431,32 +427,32 @@ const samePartyCrossPartyContextSet: LazyMarkdownIssueDescription = {
431
427
  };
432
428
 
433
429
  const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
434
- ['SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
435
- ['SameSiteCookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
430
+ ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie', sameSiteUnspecifiedErrorRead],
431
+ ['CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie', sameSiteUnspecifiedErrorSet],
436
432
  // These two don't have a deprecation date yet, but they need to be fixed eventually.
437
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie', sameSiteUnspecifiedWarnRead],
438
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie', sameSiteUnspecifiedWarnSet],
439
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie', sameSiteUnspecifiedWarnRead],
440
- ['SameSiteCookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie', sameSiteUnspecifiedWarnSet],
441
- ['SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureErrorRead],
442
- ['SameSiteCookieIssue::ExcludeSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureErrorSet],
443
- ['SameSiteCookieIssue::WarnSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureWarnRead],
444
- ['SameSiteCookieIssue::WarnSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureWarnSet],
445
- ['SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure', sameSiteWarnStrictLaxDowngradeStrict(true)],
446
- ['SameSiteCookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure', sameSiteWarnStrictLaxDowngradeStrict(false)],
447
- ['SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Secure', sameSiteWarnCrossDowngradeRead(true)],
448
- ['SameSiteCookieIssue::WarnCrossDowngrade::ReadCookie::Insecure', sameSiteWarnCrossDowngradeRead(false)],
449
- ['SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Secure', sameSiteWarnCrossDowngradeSet(true)],
450
- ['SameSiteCookieIssue::WarnCrossDowngrade::SetCookie::Insecure', sameSiteWarnCrossDowngradeSet(false)],
451
- ['SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Secure', sameSiteExcludeNavigationContextDowngrade(true)],
433
+ ['CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie', sameSiteUnspecifiedWarnRead],
434
+ ['CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie', sameSiteUnspecifiedWarnSet],
435
+ ['CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie', sameSiteUnspecifiedWarnRead],
436
+ ['CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie', sameSiteUnspecifiedWarnSet],
437
+ ['CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureErrorRead],
438
+ ['CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureErrorSet],
439
+ ['CookieIssue::WarnSameSiteNoneInsecure::ReadCookie', sameSiteNoneInsecureWarnRead],
440
+ ['CookieIssue::WarnSameSiteNoneInsecure::SetCookie', sameSiteNoneInsecureWarnSet],
441
+ ['CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure', sameSiteWarnStrictLaxDowngradeStrict(true)],
442
+ ['CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure', sameSiteWarnStrictLaxDowngradeStrict(false)],
443
+ ['CookieIssue::WarnCrossDowngrade::ReadCookie::Secure', sameSiteWarnCrossDowngradeRead(true)],
444
+ ['CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure', sameSiteWarnCrossDowngradeRead(false)],
445
+ ['CookieIssue::WarnCrossDowngrade::SetCookie::Secure', sameSiteWarnCrossDowngradeSet(true)],
446
+ ['CookieIssue::WarnCrossDowngrade::SetCookie::Insecure', sameSiteWarnCrossDowngradeSet(false)],
447
+ ['CookieIssue::ExcludeNavigationContextDowngrade::Secure', sameSiteExcludeNavigationContextDowngrade(true)],
452
448
  [
453
- 'SameSiteCookieIssue::ExcludeNavigationContextDowngrade::Insecure',
449
+ 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure',
454
450
  sameSiteExcludeNavigationContextDowngrade(false),
455
451
  ],
456
- ['SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Secure', sameSiteExcludeContextDowngradeRead(true)],
457
- ['SameSiteCookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure', sameSiteExcludeContextDowngradeRead(false)],
458
- ['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Secure', sameSiteExcludeContextDowngradeSet(true)],
459
- ['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Insecure', sameSiteExcludeContextDowngradeSet(false)],
460
- ['SameSiteCookieIssue::ExcludeInvalidSameParty::SetCookie', sameSiteInvalidSameParty],
461
- ['SameSiteCookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
452
+ ['CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure', sameSiteExcludeContextDowngradeRead(true)],
453
+ ['CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure', sameSiteExcludeContextDowngradeRead(false)],
454
+ ['CookieIssue::ExcludeContextDowngrade::SetCookie::Secure', sameSiteExcludeContextDowngradeSet(true)],
455
+ ['CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure', sameSiteExcludeContextDowngradeSet(false)],
456
+ ['CookieIssue::ExcludeInvalidSameParty::SetCookie', sameSiteInvalidSameParty],
457
+ ['CookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
462
458
  ]);
@@ -44,7 +44,7 @@ export enum IssueCategory {
44
44
  CrossOriginEmbedderPolicy = 'CrossOriginEmbedderPolicy',
45
45
  Generic = 'Generic',
46
46
  MixedContent = 'MixedContent',
47
- SameSiteCookie = 'SameSiteCookie',
47
+ Cookie = 'Cookie',
48
48
  HeavyAd = 'HeavyAd',
49
49
  ContentSecurityPolicy = 'ContentSecurityPolicy',
50
50
  TrustedWebActivity = 'TrustedWebActivity',
@@ -22,7 +22,7 @@ import {LowTextContrastIssue} from './LowTextContrastIssue.js';
22
22
  import {MixedContentIssue} from './MixedContentIssue.js';
23
23
  import {NavigatorUserAgentIssue} from './NavigatorUserAgentIssue.js';
24
24
  import {QuirksModeIssue} from './QuirksModeIssue.js';
25
- import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
25
+ import {CookieIssue} from './CookieIssue.js';
26
26
  import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
27
27
  import {SourceFrameIssuesManager} from './SourceFrameIssuesManager.js';
28
28
  import {TrustedWebActivityIssue} from './TrustedWebActivityIssue.js';
@@ -49,8 +49,8 @@ const issueCodeHandlers = new Map<
49
49
  Protocol.Audits.InspectorIssueCode,
50
50
  (model: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue) => Issue[]>([
51
51
  [
52
- Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue,
53
- SameSiteCookieIssue.fromInspectorIssue,
52
+ Protocol.Audits.InspectorIssueCode.CookieIssue,
53
+ CookieIssue.fromInspectorIssue,
54
54
  ],
55
55
  [
56
56
  Protocol.Audits.InspectorIssueCode.MixedContentIssue,
@@ -117,12 +117,6 @@ const issueCodeHandlers = new Map<
117
117
  */
118
118
  function createIssuesFromProtocolIssue(
119
119
  issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue): Issue[] {
120
- if (inspectorIssue.code.toString() === 'CookieIssue') {
121
- // TODO: backward compatibility for the next chromium roll
122
- const details = inspectorIssue.details as {cookieIssueDetails: Protocol.Audits.SameSiteCookieIssueDetails};
123
- inspectorIssue.code = Protocol.Audits.InspectorIssueCode.SameSiteCookieIssue;
124
- inspectorIssue.details.sameSiteCookieIssueDetails = details.cookieIssueDetails;
125
- }
126
120
  const handler = issueCodeHandlers.get(inspectorIssue.code);
127
121
  if (handler) {
128
122
  return handler(issuesModel, inspectorIssue);
@@ -8,7 +8,7 @@ import type * as Protocol from '../../generated/protocol.js';
8
8
 
9
9
  import {Issue, IssueCategory, IssueKind} from './Issue.js';
10
10
  import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
11
- import {isCausedByThirdParty} from './SameSiteCookieIssue.js';
11
+ import {isCausedByThirdParty} from './CookieIssue.js';
12
12
 
13
13
  const UIStrings = {
14
14
  /**
@@ -6,6 +6,7 @@ import * as AttributionReportingIssue from './AttributionReportingIssue.js';
6
6
  import * as ClientHintIssue from './ClientHintIssue.js';
7
7
  import * as ContentSecurityPolicyIssue from './ContentSecurityPolicyIssue.js';
8
8
  import * as ContrastCheckTrigger from './ContrastCheckTrigger.js';
9
+ import * as CookieIssue from './CookieIssue.js';
9
10
  import * as CorsIssue from './CorsIssue.js';
10
11
  import * as CrossOriginEmbedderPolicyIssue from './CrossOriginEmbedderPolicyIssue.js';
11
12
  import * as DeprecationIssue from './DeprecationIssue.js';
@@ -20,7 +21,6 @@ import * as MixedContentIssue from './MixedContentIssue.js';
20
21
  import * as NavigatorUserAgentIssue from './NavigatorUserAgentIssue.js';
21
22
  import * as QuirksModeIssue from './QuirksModeIssue.js';
22
23
  import * as RelatedIssue from './RelatedIssue.js';
23
- import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
24
24
  import * as SharedArrayBufferIssue from './SharedArrayBufferIssue.js';
25
25
  import * as SourceFrameIssuesManager from './SourceFrameIssuesManager.js';
26
26
  import * as TrustedWebActivityIssue from './TrustedWebActivityIssue.js';
@@ -30,6 +30,7 @@ export {
30
30
  ClientHintIssue,
31
31
  ContentSecurityPolicyIssue,
32
32
  ContrastCheckTrigger,
33
+ CookieIssue,
33
34
  CorsIssue,
34
35
  CrossOriginEmbedderPolicyIssue,
35
36
  DeprecationIssue,
@@ -44,7 +45,6 @@ export {
44
45
  NavigatorUserAgentIssue,
45
46
  QuirksModeIssue,
46
47
  RelatedIssue,
47
- SameSiteCookieIssue,
48
48
  SharedArrayBufferIssue,
49
49
  SourceFrameIssuesManager,
50
50
  TrustedWebActivityIssue,
@@ -372,7 +372,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
372
372
  async generateHeaderPatterns(uiSourceCode: Workspace.UISourceCode.UISourceCode):
373
373
  Promise<{headerPatterns: Set<string>, path: string, overridesWithRegex: HeaderOverrideWithRegex[]}> {
374
374
  const headerPatterns = new Set<string>();
375
- const content = (await uiSourceCode.requestContent()).content || '';
375
+ const content = (await uiSourceCode.requestContent()).content || '[]';
376
376
  let headerOverrides: HeaderOverride[] = [];
377
377
  try {
378
378
  headerOverrides = JSON.parse(content) as HeaderOverride[];
@@ -421,7 +421,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
421
421
  await this.#innerUpdateInterceptionPatterns();
422
422
  }
423
423
 
424
- private updateInterceptionPatterns(): void {
424
+ updateInterceptionPatterns(): void {
425
425
  void this.updateInterceptionThrottler.schedule(this.#innerUpdateInterceptionPatterns.bind(this));
426
426
  }
427
427
 
@@ -657,7 +657,7 @@ export type EventTypes = {
657
657
  [Events.ProjectChanged]: Workspace.Workspace.Project|null,
658
658
  };
659
659
 
660
- interface HeaderOverride {
660
+ export interface HeaderOverride {
661
661
  applyTo: string;
662
662
  headers: Protocol.Network.Headers;
663
663
  }
@@ -668,7 +668,7 @@ interface HeaderOverrideWithRegex {
668
668
  }
669
669
 
670
670
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
671
- function isHeaderOverride(arg: any): arg is HeaderOverride {
671
+ export function isHeaderOverride(arg: any): arg is HeaderOverride {
672
672
  if (!(arg && arg.applyTo && typeof (arg.applyTo === 'string') && arg.headers && Object.keys(arg.headers).length)) {
673
673
  return false;
674
674
  }
@@ -7,6 +7,7 @@ import * as i18n from '../../core/i18n/i18n.js';
7
7
  import * as SDK from '../../core/sdk/sdk.js';
8
8
  import * as UI from '../../ui/legacy/legacy.js';
9
9
  import * as ApplicationComponents from './components/components.js';
10
+ import * as Host from '../../core/host/host.js';
10
11
 
11
12
  import {ApplicationPanelTreeElement, ExpandableApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
12
13
  import type {ResourcesPanel} from './ResourcesPanel.js';
@@ -164,6 +165,7 @@ export class SWCacheTreeElement extends ApplicationPanelTreeElement {
164
165
  }
165
166
 
166
167
  this.showView(this.view);
168
+ Host.userMetrics.panelShown(Host.UserMetrics.PanelCodes[Host.UserMetrics.PanelCodes.service_worker_cache]);
167
169
  return false;
168
170
  }
169
171
 
@@ -192,6 +194,7 @@ export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
192
194
  this.view = new ApplicationComponents.BackForwardCacheView.BackForwardCacheViewWrapper();
193
195
  }
194
196
  this.showView(this.view);
197
+ Host.userMetrics.panelShown(Host.UserMetrics.PanelCodes[Host.UserMetrics.PanelCodes.back_forward_cache]);
195
198
  return false;
196
199
  }
197
200
  }