Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide "Trust Token" item from devtools #17118

Merged
merged 5 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions build/commands/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,31 @@ async function applyPatches() {
const patchesPath = path.join(coreRepoPath, 'patches')
const v8PatchesPath = path.join(patchesPath, 'v8')
const catapultPatchesPath = path.join(patchesPath, 'third_party', 'catapult')
const devtoolsFrontendPatchesPath = path.join(patchesPath, 'third_party', 'devtools-frontend', 'src')

const chromiumRepoPath = config.srcDir
const v8RepoPath = path.join(chromiumRepoPath, 'v8')
const catapultRepoPath = path.join(chromiumRepoPath, 'third_party', 'catapult')
const devtoolsFrontendRepoPath = path.join(chromiumRepoPath, 'third_party', 'devtools-frontend', 'src')

const chromiumPatcher = new GitPatcher(patchesPath, chromiumRepoPath)
const v8Patcher = new GitPatcher(v8PatchesPath, v8RepoPath)
const catapultPatcher = new GitPatcher(catapultPatchesPath, catapultRepoPath)
const devtoolsFrontendPatcher = new GitPatcher(devtoolsFrontendPatchesPath, devtoolsFrontendRepoPath)

const chromiumPatchStatus = await chromiumPatcher.applyPatches()
const v8PatchStatus = await v8Patcher.applyPatches()
const catapultPatchStatus = await catapultPatcher.applyPatches()
const devtoolsFrontendPatchStatus = await devtoolsFrontendPatcher.applyPatches()

// Log status for all patches
// Differentiate entries for logging
v8PatchStatus.forEach(s => s.path = path.join('v8', s.path))
catapultPatchStatus.forEach(
s => s.path = path.join('third_party', 'catapult', s.path))
const allPatchStatus =
chromiumPatchStatus.concat(v8PatchStatus).concat(catapultPatchStatus)
devtoolsFrontendPatchStatus.forEach(
s => s.path = path.join('third_party', 'devtools-frontend', 'src', s.path))
const allPatchStatus = [...chromiumPatchStatus, ...v8PatchStatus, ...catapultPatchStatus, ...devtoolsFrontendPatchStatus]
Log.allPatchStatus(allPatchStatus, 'Chromium')

const hasPatchError = allPatchStatus.some(p => p.error)
Expand Down
4 changes: 4 additions & 0 deletions build/commands/scripts/updatePatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ module.exports = function RunCommand (options) {
const chromiumDir = config.srcDir
const v8Dir = path.join(config.srcDir, 'v8')
const catapultDir = path.join(config.srcDir, 'third_party', 'catapult')
const devtoolsFrontendDir = path.join(config.srcDir, 'third_party', 'devtools-frontend', 'src')
const patchDir = path.join(config.braveCoreDir, 'patches')
const v8PatchDir = path.join(patchDir, 'v8')
const catapultPatchDir = path.join(patchDir, 'third_party', 'catapult')
const devtoolsFrontendPatchDir = path.join(patchDir, 'third_party', 'devtools-frontend', 'src')

Promise.all([
// chromium
Expand All @@ -31,6 +33,8 @@ module.exports = function RunCommand (options) {
updatePatches(v8Dir, v8PatchDir),
// third_party/catapult
updatePatches(catapultDir, catapultPatchDir),
// third_party/devtools-frontend/src
updatePatches(devtoolsFrontendDir, devtoolsFrontendPatchDir),
])
.then(() => {
console.log('Done.')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/front_end/panels/application/ApplicationPanelSidebar.ts b/front_end/panels/application/ApplicationPanelSidebar.ts
index 9becc447d320e36196e7f475984d8b64899c0cdb..cf3375f8003ea973a525740029215f83cd4e1763 100644
--- a/front_end/panels/application/ApplicationPanelSidebar.ts
+++ b/front_end/panels/application/ApplicationPanelSidebar.ts
@@ -352,7 +352,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
storageTreeElement.appendChild(this.cookieListTreeElement);

this.trustTokensTreeElement = new TrustTokensTreeElement(panel);
- storageTreeElement.appendChild(this.trustTokensTreeElement);
+ // storageTreeElement.appendChild(this.trustTokensTreeElement);

this.interestGroupTreeElement = new InterestGroupTreeElement(panel);
storageTreeElement.appendChild(this.interestGroupTreeElement);