Skip to content

Commit

Permalink
Hide "Trust Token" item from devtools
Browse files Browse the repository at this point in the history
[We disabled the "Trust token" feature](#8039),
so we shouldn't reveal this item.
  • Loading branch information
sangwoo108 committed Feb 9, 2023
1 parent f41821f commit 9a345fc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/commands/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,32 @@ 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))
devtoolsFrontendPatchStatus.forEach(
s => s.path = path.join('third_party', 'devtools-frontend', 'src', s.path))
const allPatchStatus =
chromiumPatchStatus.concat(v8PatchStatus).concat(catapultPatchStatus)
chromiumPatchStatus.concat(v8PatchStatus).concat(catapultPatchStatus).concat(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 5d024c6d3ce493ae4df798593d4a22f84e4acf2d..ce84d171b90d9f7f9363a90513236ab34fca2b06 100644
--- a/front_end/panels/application/ApplicationPanelSidebar.ts
+++ b/front_end/panels/application/ApplicationPanelSidebar.ts
@@ -355,7 +355,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);

0 comments on commit 9a345fc

Please sign in to comment.