File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
ui/legacy/components/cookie_table Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -429,6 +429,10 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
429429 devToolsPrivacyUI : {
430430 enabled : false ,
431431 } ,
432+ devToolsEnableOriginBoundCookies : {
433+ portBindingEnabled : false ,
434+ schemeBindingEnabled : false ,
435+ } ,
432436 isOffTheRecord : false ,
433437 } ;
434438 if ( 'hostConfigForTesting' in globalThis ) {
Original file line number Diff line number Diff line change @@ -365,6 +365,11 @@ export interface HostConfigPrivacyUI {
365365 enabled : boolean ;
366366}
367367
368+ export interface HostConfigEnableOriginBoundCookies {
369+ portBindingEnabled : boolean ;
370+ schemeBindingEnabled : boolean ;
371+ }
372+
368373// We use `RecursivePartial` here to enforce that DevTools code is able to
369374// handle `HostConfig` objects of an unexpected shape. This can happen if
370375// the implementation in the Chromium backend is changed without correctly
@@ -386,6 +391,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
386391 * or guest mode, rather than a "normal" profile.
387392 */
388393 isOffTheRecord : boolean ,
394+ devToolsEnableOriginBoundCookies : HostConfigEnableOriginBoundCookies ,
389395} > ;
390396
391397/**
Original file line number Diff line number Diff line change @@ -546,6 +546,11 @@ export function getGetHostConfigStub(config: Root.Runtime.HostConfig): sinon.Sin
546546 enabled : false ,
547547 ...config . devToolsPrivacyUI ,
548548 } as Root . Runtime . HostConfigPrivacyUI ,
549+ devToolsEnableOriginBoundCookies : {
550+ portBindingEnabled : false ,
551+ schemeBindingEnabled : false ,
552+ ...config . devToolsEnableOriginBoundCookies ,
553+ } as Root . Runtime . HostConfigEnableOriginBoundCookies ,
549554 isOffTheRecord : false ,
550555 } ) ;
551556}
Original file line number Diff line number Diff line change 3535import * as Common from '../../../../core/common/common.js' ;
3636import * as i18n from '../../../../core/i18n/i18n.js' ;
3737import * as Platform from '../../../../core/platform/platform.js' ;
38- import * as Root from '../../../../core/root/root.js' ;
3938import * as SDK from '../../../../core/sdk/sdk.js' ;
4039import * as Protocol from '../../../../generated/protocol.js' ;
4140import * as IssuesManager from '../../../../models/issues_manager/issues_manager.js' ;
@@ -237,7 +236,8 @@ export class CookiesTable extends UI.Widget.VBox {
237236 } ,
238237 ] as DataGrid . DataGrid . ColumnDescriptor [ ] ;
239238
240- if ( Root . Runtime . experiments . isEnabled ( 'experimental-cookie-features' ) ) {
239+ const config = Common . Settings . Settings . instance ( ) . getHostConfig ( ) ;
240+ if ( config . devToolsEnableOriginBoundCookies ?. schemeBindingEnabled ) {
241241 const additionalColumns = [
242242 {
243243 id : SDK . Cookie . Attribute . SOURCE_SCHEME ,
@@ -247,6 +247,11 @@ export class CookiesTable extends UI.Widget.VBox {
247247 weight : 7 ,
248248 editable,
249249 } ,
250+ ] as DataGrid . DataGrid . ColumnDescriptor [ ] ;
251+ columns . push ( ...additionalColumns ) ;
252+ }
253+ if ( config . devToolsEnableOriginBoundCookies ?. portBindingEnabled ) {
254+ const additionalColumns = [
250255 {
251256 id : SDK . Cookie . Attribute . SOURCE_PORT ,
252257 title : 'SourcePort' ,
You can’t perform that action at this time.
0 commit comments