惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog RSS Feed
博客园_首页
N
News | PayPal Newsroom
有赞技术团队
有赞技术团队
The Hacker News
The Hacker News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
S
SegmentFault 最新的问题
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
P
Privacy & Cybersecurity Law Blog
AI
AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Schneier on Security
Schneier on Security
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
量子位
Forbes - Security
Forbes - Security
爱范儿
爱范儿
云风的 BLOG
云风的 BLOG
SecWiki News
SecWiki News
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tor Project blog
Recorded Future
Recorded Future
A
About on SuperTechFans
J
Java Code Geeks
The Register - Security
The Register - Security
PCI Perspectives
PCI Perspectives
H
Hacker News: Front Page
V2EX - 技术
V2EX - 技术
S
Secure Thoughts
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Scott Helme
Scott Helme
T
The Exploit Database - CXSecurity.com
Y
Y Combinator Blog
AWS News Blog
AWS News Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
IT之家
IT之家
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
C
CERT Recently Published Vulnerability Notes
L
LangChain Blog
F
Full Disclosure
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The GitHub Blog
The GitHub Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How to Build an Enterprise Browser — Branding
Jani Hautaka · 2026-05-27 · via DEV Community

Originally posted on Medium

In the first post I sketched out what an enterprise browser is and laid the foundation for my proof-of-concept, enterprise-browser-chromium. One bullet in that post was “Branding: Apply custom branding to establish a unique identity.” In practice that one bullet means touching strings, themes, build flags, installer code, Mac bundles, Windows resource sections, and Linux desktop files. This post is dedicated to that one bullet.


What “branding” really is in Chromium

Chromium ships as a generic open-source browser; Google Chrome is the proprietary product built on top of it. Anything trademarked (the Chrome logo, the “Google Chrome” name, certain installer artwork) sits behind a small set of build switches and is omitted from the public build. Branding, in source terms, is the answer to a handful of questions asked at build time: what product name to use, where icons and OS-level assets live, and what the product calls itself in the UI and installer.


How Chromium wires the branding switch

The whole branding system starts with a single GN argument declared in build/config/chrome_build.gni:

declare_args() {
  is_chrome_branded = false
  # ...
}

Enter fullscreen mode Exit fullscreen mode

When that argument flips to true, Chromium’s build switches to Google’s proprietary identity. (Internally the if/else keys off a derived is_internal_chrome_branded = is_chrome_branded && enable_src_internal; the second flag pulls in Google’s src-internal repo and isn’t available to public builds.) Two path variables, set in the same file, are what the rest of the build consumes:

if (is_internal_chrome_branded) {
  branding_path_component = "google_chrome"
  branding_path_product   = "google_chrome"
} else {
  branding_path_component = "chromium"
  branding_path_product   = "chromium"
}

Enter fullscreen mode Exit fullscreen mode

Almost everything else flows from those two strings:

  • branding_path_component selects the subdirectory inside chrome/app/theme/ for icons and artwork.
  • branding_path_product selects the .grd file used for branded strings.

In C++, the same switch surfaces as a BUILDFLAG. build/BUILD.gn generates branding_buildflags.h, which gives Chromium code two flags:

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
  // Google Chrome only
#elif BUILDFLAG(CHROMIUM_BRANDING)
  // Chromium (or any non-Google branded build)
#endif

Enter fullscreen mode Exit fullscreen mode

In Grit (the string and resource format), the same switch appears as <if expr="_google_chrome">. In Java, it appears as BuildConfig.IS_CHROME_BRANDED.

A downstream browser tells the build about itself, supplies parallel assets, and the rest of the build picks them up automatically.


The BRANDING file

Each brand has a plain-text BRANDING file at the root of its theme directory. Enterprise Browser’s looks like:

COMPANY_FULLNAME=KodeGood
COMPANY_SHORTNAME=KodeGood
PRODUCT_FULLNAME=Enterprise Browser
PRODUCT_SHORTNAME=Enterprise Browser
PRODUCT_INSTALLER_FULLNAME=Enterprise Browser Installer
PRODUCT_INSTALLER_SHORTNAME=Enterprise Browser Installer
COPYRIGHT=Copyright @LASTCHANGE_YEAR@ Jani Hautakangas <jani@kodegood.com>. All rights reserved.
MAC_BUNDLE_ID=com.kodegood.EnterpriseBrowser
MAC_CREATOR_CODE=Cr24

Enter fullscreen mode Exit fullscreen mode

build/util/branding.gni parses this file at GN time and exposes its fields as GN variables (chrome_product_full_name, chrome_mac_bundle_id, and friends). Those variables then flow into:

  • the Windows .rc resource that decorates the EXE with version metadata,
  • the Mac Info.plist template, where CFBundleIdentifier and CFBundleName are substituted from these fields,
  • the Linux installer scripts, which use the company and product names to generate .deb/.rpm package metadata.

The main branding topics

The diagram below shows the parallel enterprise_browser/ tree in the repo. Each topic that follows maps to one or more of these paths.

Enterprise Browser repo tree

Product name strings

Chromium splits the product-name-bearing strings into two files:

  • chrome/app/chromium_strings.grd
  • chrome/app/google_chrome_strings.grd

They are structurally identical but say Chromium and Google Chrome respectively. The build chooses between them through branding_path_product:

grit_strings("branded_strings") {
  source = "${branding_path_product}_strings.grd"
}

Enter fullscreen mode Exit fullscreen mode

The same pattern is repeated in components/, where there is components_chromium_strings.grd vs components_google_chrome_strings.grd, and again in the settings UI via .grdp partials.

These three pairs exist because they live in three layers: top-level browser strings, settings UI strings, and //components (which is architecturally below //chrome and cannot depend on it).

Doing this rename by hand isn't realistic: the English .grd has hundreds of Chromium mentions, multiplied by 80+ per-locale .xtb files. A broader Chrome/Chromium sweep can also mangle compound terms like ChromeOS and Chromecast, which must survive intact. The only sane path is a script.

Enterprise Browser ships an eb l10n command for this.

⚠ Caveat: a regex sweep across 80+ locales is a placeholder, not a real translation. Non-Latin transliterations and idiomatic phrasing need a real translation pipeline, which this post doesn’t cover.

Side-by-side: Chromium vs. Enterprise Browser About page

Themes, icons, and platform artwork

Visual assets live in chrome/app/theme/, organized in three parallel scale tiers:

chrome/app/theme/<brand>/                   # vector + master assets, BRANDING file
chrome/app/theme/default_100_percent/<brand>/  # raster, 1x
chrome/app/theme/default_200_percent/<brand>/  # raster, 2x

Enter fullscreen mode Exit fullscreen mode

Inside <brand>/, the build expects platform subdirectories: mac/app.icns, win/<brand>.ico (and a handful of file-handler icons), and linux/product_logo_*.png.

chrome/app/theme/theme_resources.grd references the in-binary UI resources here via ${branding_path_component} substitution; the platform-specific bundle assets (.icns, .ico, Linux logos) flow in through separate platform bundle and installer rules.

Enterprise Browser keeps its parallel set of these assets under enterprise_browser/app/theme/; the eb branding build step mirrors them into chrome/app/theme/enterprise_browser/ before GN runs.

Enterprise Browser theme tree layout

The branding GN switch

Chromium’s chrome_build.gni only knows about two brands out of the box: chromium and google_chrome. To plug in a third, you have two options: patch the upstream file, or override the GN args before GN runs.

Enterprise Browser currently takes the patch route. build-config-chrome_build.gni.patch adds a new branch to the conditional:

} else if (is_enterprise_browser) {
  branding_path_component = "enterprise_browser"
  branding_path_product   = "enterprise_browser"
}

Enter fullscreen mode Exit fullscreen mode

…and the new is_enterprise_browser argument is declared in enterprise_browser/build/enterprise_browser.gni:

declare_args() {
  is_enterprise_browser = true
}

Enter fullscreen mode Exit fullscreen mode

This works, but carries an ongoing cost. The patch's hunk context sits inside the if / else if / else chain in chrome_build.gni. Any time upstream touches that chain (new branches, reordering, rewritten declarations), the surrounding lines stop matching and the patch needs rebasing. The breakage is mechanical, not logical, but you still have to fix it on every uprev (each time you update to a newer Chromium version).

The better long-term approach skips the patch entirely. GN args declared with declare_args() can be overridden from args.gn: your value wins, the default is skipped. Ship a branding_defaults.gni that sets branding_path_component and branding_path_product, and import it from args.gn before gn gen runs. The upstream file stays untouched, and uprevs become noticeably less painful.

Windows .exe properties showing Enterprise Browser branding

Installer strings and platform packaging

The installer has its own product name, its own shortcut names, and on Windows it registers OS-level rules that include the product name.

Chromium drives a lot of this from a Python script, chrome/installer/util/prebuild/create_installer_string_rc.py. It has a MODE_SPECIFIC_STRINGS dictionary that, for each branding mode (google_chrome, chromium), lists which string IDs to emit into the installer’s resource section.

Enterprise Browser patches that script (chrome-installer-util-prebuild-create_installer_string_rc.py.patch) to add an enterprise_browser mode:

MODE_SPECIFIC_STRINGS = {
  'IDS_APP_SHORTCUTS_SUBDIR_NAME': {
    'google_chrome': [
      'IDS_APP_SHORTCUTS_SUBDIR_NAME',
      'IDS_APP_SHORTCUTS_SUBDIR_NAME_BETA',
      # ...
    ],
    'chromium': [
      'IDS_APP_SHORTCUTS_SUBDIR_NAME',
    ],
    'enterprise_browser': [
      'IDS_APP_SHORTCUTS_SUBDIR_NAME',
    ],
  },
  # ...same shape for IDS_INBOUND_MDNS_RULE_DESCRIPTION, IDS_PRODUCT_NAME, etc.
}

Enter fullscreen mode Exit fullscreen mode

This is the kind of detail that is invisible until you ship a Windows build, and then it becomes a long tail of small symptoms (wrong product name in the Start menu, wrong firewall rule description, etc.) that all trace back to a few entries in this dictionary.

Vector icons inside the UI

Branding is not only the outside of the binary. Vector icons baked into the browser UI (the About-dialog product mark, the new tab page icon, the icon used in profile pickers) live in .icon files under components/vector_icons/<brand>/. Enterprise Browser ships its own product.icon and product_refresh.icon under components/vector_icons/enterprise_browser/.

UI customization: settings layout, new tab page, splash

Beyond names and icons, branding extends to the layout and content of user-facing surfaces too: chrome://settings sections, the new tab page, the first-run welcome, splash and intro screens, the profile picker, the about page. Mechanically this is different work: editing WebUI HTML/TS/CSS under chrome/browser/resources/ plus native C++ that builds the settings tree.

Enterprise Browser has made a start here. The intro flow, the first-run / splash onboarding sequence, and the profile picker are already customized, so the onboarding and sign-in surfaces are visibly Enterprise Browser.

Enterprise Browser first-run intro / splash screen

The build-time mirroring tool

Most of the above is data: strings, themes, vector icons, the BRANDING file. The thing that applies them to the Chromium tree is a build step that mirrors your branding files into the right places under src/ before GN runs.

Enterprise Browser does the same thing in tools/eb/eb.py under cmd_branding. The mapping is exactly the parallel set: theme directories (master + both scale tiers), the XTB translation resources, the three string bundles, and the vector icons. Run as eb branding, or implicitly via eb sync.


Wrapping up

Conceptually Chromium’s branding system is a single switch that cascades through dozens of subsystems: one flag, two path variables. The implementation is messier: a long tail of #if BUILDFLAG(GOOGLE_CHROME_BRANDING) blocks, Grit <if expr="_google_chrome"> conditionals, Java checks, and per-mode entries in build scripts. Adding a new brand means making sure all those fences understand your brand.

Enterprise Browser has the foundation in place (GN wiring, theme tree, string bundles, BRANDING file, build-step mirror), but most icons and strings under those directories are still stock Chromium files copied and renamed. Most topics above are partly done at best, with branded artwork, code signing, and the updater’s own branding pipeline (chrome/updater/branding.gni is its own subsystem and isn’t covered here) still ahead. Each piece is small in isolation; most have to be re-checked on every uprev.

Repo: KodeGood/enterprise-browser-chromium.