DEV Community

Cover image for Revoking My Permissions Was Not Left to Me
Mustafa ERBAY
Mustafa ERBAY

Posted on Originally published at mustafaerbay.com.tr

Revoking My Permissions Was Not Left to Me

At 13:23 this afternoon Chrome revoked a site's notification permission. I was at the
machine and noticed nothing. Fifteen minutes and forty-eight seconds later, at 13:38,
I opened that file for an entirely different reason and found the decision sitting in
it.

The reason I was looking is a sentence I wrote three weeks ago. On 24 October I opened
macOS's notification ledger, counted ninety-four rows, and wrote that twenty-five of
them pointed at an application that no longer exists. At the end of that article I
said this: "A revocation mechanism mostly doesn't exist; and when it does — as with
web permissions — using it is left to you."

The last six words were wrong. Chrome has used that mechanism six times since
mid-October, and on all six it did not wait for me. Revoking permissions was not left
to me. Against that, the same file holds two rows that put one site outside the
mechanism and that never end by themselves — and by the end of this article I still
could not work out who wrote them, or when.

Where the ledger lives, and the two traps that fooled me

All of it sits in one JSON file:
~/Library/Application Support/Google/Chrome/Default/Preferences. The whole
measurement was taken from the file as read at 13:38:59 on 16 November 2026, on Chrome
157.0.8103.51. Under profile.content_settings.exceptions there are 108 keys, but one
of them is not a bucket at all — it is a flag set to true — which leaves 107 buckets,
45 with data and 62 empty. The file is also live: with Chrome open the row counts shift
by a few units between two reads, so the counts below belong to a single moment.

The first trap is in the key name. On Chromium's C++ side the bucket names look like
REVOKED_UNUSED_SITE_PERMISSIONS, so I went looking for
revoked_unused_site_permissions in the JSON. A lookup like that does not raise in
Python; a missing key returns an empty dictionary. The screen said "0 records", and I
concluded the mechanism had never run. All three buckets did that. In all three I saw
"0 records". None of the three existed.

# Wrong: a missing key looks exactly like an empty bucket
ex.get('revoked_unused_site_permissions', {})   # -> {}

# Right: test that the KEY EXISTS first
for k in ['unused_site_permissions',
          'abusive_notification_permissions',
          'disruptive_notification_permissions']:
    print(k in ex, k, len(ex[k]) if k in ex else 'KEY MISSING')
# True unused_site_permissions 5
# True abusive_notification_permissions 1
# True disruptive_notification_permissions 1
Enter fullscreen mode Exit fullscreen mode

The revoked_ prefix lives only in the enum name. A missing key and an empty bucket
are not the same thing, but dictionary access turns them into the same thing.

The second trap was sneakier, and it sent the first draft of this article to the bin.
The timestamps in the file are microseconds since 1601 — and they are UTC. I
decoded them and compared them straight against my local clock. Istanbul is UTC+3, so
every stamp came out three hours early: a permission taken at half past nine in the
morning became "half past six", this afternoon's decision slid back to "10:23", and a
gap of fifteen minutes turned into three hours and sixteen minutes in my hands. The
most striking number in that draft was exactly as large as my own error.

Both are the same family of mistake: reading a number without asking what frame it
belongs to.
In the first, "zero" actually meant "no key". In the second, "10:23"
actually meant "13:23". Through the rest of this article I tried to ask that question
of every number.

Sixty days unused, thirty days visible

The first ledger is unused_site_permissions and it holds five rows. Chrome's help
page puts it in a single sentence: to protect your data, it removes permissions from
sites you haven't used recently. What "recently" means is not on that page; it is in
the source. Inside unused_site_permissions_manager.cc the threshold sits in plain
sight:

// Determines the time interval after which sites are considered to be unused
// and their permissions will be revoked.
const base::TimeDelta kUnusedSitePermissionsRevocationThreshold =
    base::Days(60);
Enter fullscreen mode Exit fullscreen mode

Sixty days. The feature is on by default on desktop and off by default on Android;
the #if/#else block that decides this is not in
unused_site_permissions_manager.cc but in
components/content_settings/core/common/features.cc.

Here are my five rows, in local time. Two addresses go unnamed: one is an internal
application on the customer side, outside this blog's scope; the other is a personal
address I would rather not print here.

Address Permission taken back Revoked (local) Window closes
play.google.com loopback-network 16 Oct 09:34 15 Nov 09:34
a PaaS subdomain media-stream-mic 23 Oct 03:31 22 Nov 03:31
www.hackerrank.com clipboard 23 Oct 03:31 22 Nov 03:31
expo.dev loopback-network 31 Oct 17:25 30 Nov 17:25
an internal address clipboard 14 Nov 08:42 14 Dec 08:42

The thirty-day window comes from a single constant in
components/safety_check/safety_check.cc:

const base::TimeDelta kUnusedSitePermissionsRevocationCleanUpThreshold =
    base::Days(30);
Enter fullscreen mode Exit fullscreen mode

There is no comment above the constant; it really does stand on its own. The sentence
explaining it lives in the neighbouring file, safety_check.h, above the function
declaration: the interval after which revoked permissions are "cleaned up and no
longer shown to users". So the thirty days is not a grace period for the permission to
come back; it is how long the record stays visible in the list. The permission does
not return on day thirty-one — the record leaves.

In all five rows the lifetime field is literally 2,592,000,000,000 microseconds,
exactly thirty days. But expiration minus last_modified is not exactly thirty days
in any of them: all five fall short by between 1 and 5 microseconds. My first
draft said "no deviation"; there is deviation, it just renders as 29.99999999997 and
the eye rounds it to thirty. The stored lifetime is a constant; the stamps are two
clock readings taken on two separate lines, and the microseconds are the cost of that.

I care about this because two paragraphs on, microseconds say something. The two rows
from 23 October were written in the same sweep: one at 13437189093415268, the other at

  1. There are 102 microseconds between them. Chrome went over two sites in a single pass that night; not two separate decisions, but two rows of one sweep.

Turn the sixty-day threshold around and these rows also tell me about my own browsing.
The dates below are not measured, they are derived from the threshold; because the
sweep runs once a day and does not run at all while Chrome is closed, they are "no
later than" dates: 17 August, 24 August (two sites), 1 September, 15 September. Five
days spread from mid-August to mid-September, the last time five sites saw me.

The row whose window closed, still in the file

The first row in the table is the interesting one. The play.google.com record's
window closed at 09:34 on 15 November; I looked at the file at 13:38 the next day.
That is 28.08 hours, and the row was still sitting there.

I would like to write that up as a bug, but the source says something else. The sweep
is not continuous; inside revoked_permissions_service.cc the frequency is fixed by a
single constant:

// Determines the frequency at which permissions of sites are checked whether
// they are unused.
const base::TimeDelta kUnusedSitePermissionsRepeatedUpdateInterval =
    base::Days(1);
Enter fullscreen mode Exit fullscreen mode

Once a day. A record's "expired" stamp is an instant, while its deletion is work left
to the next sweep. A row sitting in the file does not mean it shows in the list
either: the list is rebuilt through GetSettingsForOneType, and a record's validity is
decided by the expiration field.

Here is a boundary I have to be honest about: I did not trace from the source exactly
when the sweep is triggered. The daily interval is confirmed; the trigger is not.
"Still there after 28 hours" is a measurement; "because the sweep hasn't run yet" is
the most plausible explanation consistent with the source, not a proven causality.

The decision taken at 13:23 this afternoon

The second ledger is disruptive_notification_permissions and it holds one row. That
row was written sixteen minutes before I opened the file. Chrome's help page describes
the mechanism: when it finds a site disruptive, it may remove the site's permission to
send notifications on its own and require the site to ask again.

The fields inside the record carry the reasoning like a minute-book entry:

{
  "daily_notification_count": 16,
  "notification_click_count": 0,
  "page_visit": 0,
  "site_engagement": 0.0,
  "has_reported_proposal": true,
  "revoked_status": "revoke",
  "timestamp": "13439298191485538"
}
Enter fullscreen mode Exit fullscreen mode

The thresholds are in chrome/common/chrome_features.cc and they are explicit for
desktop: at least six notifications a day and an engagement score of exactly
zero
. The site is a football transfer site; at sixteen notifications a day it cleared
the count threshold by 2.7×, and on the engagement side it sat at a flat zero. So not
an extreme case — a little over the bar.

I came very close to misreading two of those fields. page_visit: 0 and
notification_click_count: 0 looked to me like "never went, never clicked". In the
source it is not that: these counters run from the moment revocation is proposed, and
on desktop the time between proposal and revocation, waiting_time_as_proposed, is
at least fourteen days (the sweep runs once a day, so it can be longer). The two
zeros are not a lifetime record; they summarise my complete lack of reaction inside
that window. Reading a zero without knowing which window
it belongs to is another form of confusing an empty bucket with a missing key.

This ledger's revocation record is thirty days too. Same constant, same window.

The exemption is not one row, it is two

The third ledger is abusive_notification_permissions and it holds one row. It
resembles none of the others: no lifetime field, no expiration field, a value of
{"revoked_status": "ignore"}, and it has been there for 291 days.

What does ignore mean? In Chromium the revoked_status key can take six different
strings — proposed, revoke, acknowledged, ignore, ignore_inside_sh,
ignore_outside_sh — though on the abusive side only two of them are used. The
sentence explaining ignore is in safety_hub_constants.h: if the user takes action
to grant a permission despite warnings against doing so, Chrome should exempt that
origin from future auto-revocations. In code that branch sets the lifetime to zero and
calls ExemptOriginFromFutureRevocations. So this row is not a revocation record; it
is a switch that turns the mechanism off for that address.

In my first draft I stopped here and wrote "I cannot say how it came to be." I stopped
in the wrong place. I had written down the function's name and never looked for its
output. In the same file there is another bucket, permission_autorevocation_data,
holding a single row — the same address:

{"notifications": {"exempted": true, "revoked": false}}
Enter fullscreen mode Exit fullscreen mode

Its stamp is 13414163601817717; the abusive row's stamp is 13414163601817733.
There are 16 microseconds between them. Two paragraphs earlier I looked at a
102-microsecond gap and said "not two separate decisions, but two rows of one sweep";
here the same test is sharper still. Two rows, one action.

Reading that "revoked": false I almost forgot my own lesson one more time. The field
offers a tempting sentence: "so this address's permission was never revoked." Go to the
source and the sentence collapses. The field's name in code is
has_been_previously_revoked, and the only place it is set to true is
RevokePermission inside permission_revocation_request.cc. Safety Hub's abusive
notification revocation does not go through that path; it calls a different function
entirely. So false does not say "never revoked" — it says "this particular path
never ran
". The same trap for the third time: the thing to read is not the value but
which frame the field belongs to.

Something I could not resolve is still left over. In today's code both paths that write
this exemption run through granting the permission — yet that same address's
notification setting is setting: 2 right now, blocked, and the block record is 105
days older than the exemption. I have not resolved the contradiction. The most
plausible explanation is that the rows were written in January 2026 by a version that
behaved differently from today's; but I did not verify that, so I leave it as an open
question rather than an explanation.

Having switched a mechanism off for one site on your own machine and not
remembering it is a bit like the key you find in your own house without knowing which
door it opens. You don't throw it away. You also don't know what it is for.

What I took for "never expires" is actually the rule

In my first draft I called those rows "the only row in my profile that never expires".
Checking that claim turned the thesis around. Of the 4,895 rows across the 107
buckets, 3,930 carry neither an expiration nor a lifetime field. Never expiring
is not the exception, it is the default. All 29 rows in the
notifications bucket are permanent; so are 17 in popups, 35 in ssl_cert_decisions,
209 in app_banner.

The accurate statement is this: of the seven rows across the three revocation ledgers,
six will be deleted after thirty days and one will not. The exceptional side is the
side that expires at all.

Counting that turned out to be the most surprising part. The file holds 965 rows with
an expiry, and 959 of them are media_engagement — Chrome's cache of media playback
history. Set that aside, and of the remaining 3,936 rows exactly six expire — and
those six are precisely the subject of this article: five unused-site revocations and
one notification revocation. Discount one cache, and the only thing in this file that
deletes itself is the set of decisions Chrome made on my behalf. Everything else,
80.3 percent of the rows, stays until I remove it.

Where the mechanism reaches, and where it doesn't

The notifications bucket now holds 29 rows: 13 allowed, 16 blocked. Three are
localhost. This morning it was 14 allowed, not 13 — Chrome took one at 13:23 and
that address left the bucket entirely. So the measurement erases the mechanism's own
work from the count: when I say "13 allowed sites", one of them has already gone.

One out of fourteen. I don't read that as a shortfall; the threshold is high. But the
gap between assuming "Chrome is cleaning up notifications" and measuring it is exactly
this: the remaining thirteen sites go on sending me notifications and none of them
lands in any ledger, because they are not disruptive enough.

What is really missing, though, is not what got cleaned but what stayed. In the same
file the loopback_network bucket has three rows and local_network has four; four of
those are granted, and all four are permanent. Two belong to a browser extension,
one to my own management panel, one to an internal address. Earlier in this article I
described Chrome taking loopback-network away from two sites; the four it did not
take are still there, and Safety Check does not show them to me. That was the number
worth looking at.

Three ledgers, three different clocks

Starting this piece, I thought "Chrome's revocation ledger" was one thing. There are
three, and the most striking difference is not in the revocations but in the
exemptions:

Diagram

Inside disruptive_notification_permissions_manager.cc the exemption has two separate
lifetimes, and which one applies depends on where I clicked:

const base::TimeDelta kIgnoreExpirationOutsideSafetyHub = base::Days(90);
const base::TimeDelta kIgnoreExpirationInsideSafetyHub = base::Days(365);
Enter fullscreen mode Exit fullscreen mode

Re-grant the permission from inside Safety Hub and the exemption lives a year; do it
anywhere else — the site settings page and the site's own permission bubble included —
and it lives three months. A fourfold difference, and no screen says so. On the abusive side the same exemption has no lifetime field at all. But
having no lifetime does not make it untouchable: when that address's notification
setting is changed by hand the record is deleted from the list, and the comment in the
source says plainly what follows — once an ignore entry is removed, the site goes
back into automatic revocation as soon as the criteria are met again. "Never expires"
does not mean "permanent"; it means "does not end by itself". My two rows have stood
for 291 days because I have not touched that address for 291 days.

If you are going to look at your own file

  • Test that the key exists, before you look at its count. Without k in ex, a bucket that isn't there looks like a bucket that's empty.
  • Remember the stamps are UTC. Microseconds since the 1601 epoch, in UTC; convert before comparing against your local clock, or you will be wrong by your own offset.
  • The absence of a lifetime field is information — but it is not rare: most rows in this file lack one. Look for the rows that do expire, not the ones that don't.
  • Read zero counters together with their window. page_visit: 0 is not lifetime-wide; it is the window of at least fourteen days since the proposal.
  • Look at what stayed, not at what was revoked. Safety Check shows you what was taken back; the granted rows in loopback_network and local_network do not appear there.

The six words that were wrong

The October article did not skip web permissions; it named the Push API explicitly and
said the web's own model defines a revocation mechanism. The error was not about
whether the mechanism exists, but about whose hands it is in: where I wrote "using
it is left to you", the mechanism was already running on my behalf and independently of
me.

The difference looks small, and it reverses the direction. As I wrote on 24 October,
using a machine for years means carrying an archive of decisions made without
noticing. What the file shows me is that — contrary to what I assumed when
I counted extension permissions
too — the thing in that archive is not the permissions I granted. Permissions time out;
Chrome deleted six of them in a month. What stays in the archive is two rows that put a
single address outside the mechanism, and I still cannot say how they got there.

Official Sources

Top comments (0)