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

Don't clear first party storage area if browser is launched in incognito mode from command line #24543

Closed
Changes from 2 commits
Commits
Show all changes
3050 commits
Select commit Hold shift + click to select a range
35a0d15
[iOS] - Update Guardian Connect & Add Smart Proxy Setting & Kill Swit…
Brandon-T Dec 5, 2024
e3b611f
Resolve QSE google search query
deeppandya Nov 27, 2024
1d1f125
sets default shortcut for screenshot via sharing hub (#26885)
jonathansampson Dec 5, 2024
1e78602
[ads] const std::string_view code health
tmancey Dec 4, 2024
37403be
[ads] base::MakeFixedFlatSet code health
tmancey Dec 4, 2024
25da4b8
[ads] std::optional code health
tmancey Dec 4, 2024
ced5821
[ads] IWYU code health
tmancey Dec 4, 2024
0b571c1
[ads] Move constructor code health
tmancey Dec 5, 2024
5d55612
[ads] Vertical whitespace code health
tmancey Dec 5, 2024
a6736dc
[Web UI]: Convert Bookmarks to new overrides (#26880)
fallaciousreasoning Dec 5, 2024
ffcf9ee
1.75.78
brave-builds Dec 5, 2024
846d68c
fix(privacy): Secure access to window origin on iOS (#26841)
StephenHeaps Dec 5, 2024
517ccc1
Fixed empty space is added in guest window's app menu
simonhong Dec 5, 2024
1468c1c
1.75.79
brave-builds Dec 6, 2024
21abe98
[Web UI]: Convert extensions to new overrides (#26881)
fallaciousreasoning Dec 6, 2024
d6c5d0a
Bump path-to-regexp and express
dependabot[bot] Dec 5, 2024
675d171
Disable cosmetic filtering on Speedreader pages (#25692)
boocmp Dec 6, 2024
178380f
Introduced enum type for vpn's manage url
simonhong Dec 5, 2024
a796f27
Fixed build failure on linux due to not defined vpn method in linux
simonhong Dec 5, 2024
f88a11e
1.75.80
brave-builds Dec 6, 2024
1045fc3
Workaround for crbug.com/378381144 (#26899)
atuchin-m Dec 6, 2024
e366381
Removed unnecessary separator from more tools menu
simonhong Dec 6, 2024
d136127
[DanglingPtr] Enable the dector for iOS builds (#26856)
cdesouza-chromium Dec 6, 2024
af61861
Reverted to using github.event.pull_request.base.sha as the target sh…
wknapik Dec 6, 2024
4ca60d0
[Rewards 3.0] Add small UI improvements
zenparsing Dec 5, 2024
c01e357
[Rewards 3.0] Retry Ads service if Ads service is restarting
zenparsing Dec 5, 2024
d394822
Upate QSE edit url behaviour
deeppandya Dec 6, 2024
67dff3a
1.75.81
brave-builds Dec 6, 2024
337209f
[iOS] - Make Playlist WebCompat only apply to Playlist WebViews and n…
Brandon-T Dec 6, 2024
37fb8d9
fix(wallet): Dismiss Transactions Partner Modal on First Click
Douglashdaniel Dec 6, 2024
b4c87a0
Fix wallet asset images not fetched from nala design system. (#26909)
StephenHeaps Dec 6, 2024
747e24d
Fix blank privacy settings page
emerick Dec 5, 2024
3a07c17
Farbling per site improvements (#26827)
goodov Dec 6, 2024
23733e6
Override SyncPrefs::SetPasswordSyncAllowed to keep password_sync_allo…
AlexeyBarabash Dec 5, 2024
8870df0
Unit test to ensure SyncPrefs::SetPasswordSyncAllowed is no-op
AlexeyBarabash Dec 5, 2024
0e55025
Fixed gn_check missing deps error
AlexeyBarabash Dec 5, 2024
67ddf4d
1.75.82
brave-builds Dec 6, 2024
632744e
1.75.83
brave-builds Dec 6, 2024
1b576f3
Changed ParameterName presubmit rule severity to error (#26794)
AlexeyBarabash Dec 6, 2024
cc06a78
Pin dependency @types/bs58 to 4.0.4 (#26652)
renovate[bot] Dec 6, 2024
f73c903
Removes person/people -> profile string replacements.
mkarolin Dec 5, 2024
e9ff68f
Adds extra check on ViewProvider class methods in bytecode tests on A…
SergeyZhukovsky Dec 6, 2024
aa9a0b0
[DanglingPtr] Enable dangling detection on Windows (#26904)
cdesouza-chromium Dec 6, 2024
6841947
[ads] const code health
tmancey Dec 6, 2024
fce835d
Fix crash when clicking profile button in guest window
emerick Dec 6, 2024
14eed15
1.75.84
brave-builds Dec 7, 2024
f79d8e5
1.75.85
brave-builds Dec 9, 2024
fba1917
Adjusted location bar right edge padding
simonhong Dec 6, 2024
6577d2e
keep an AI Chat conversation alive if it has chat messages and its as…
petemill Nov 12, 2024
9095f67
Keep conversations in memory if content is alive even when AIChatHist…
petemill Nov 25, 2024
223e1aa
fix DanglingPtr in unit test
petemill Dec 8, 2024
73b6f22
Roll perf profiles update (update-perf-profile-2024-12-08-16-16) (#26…
brave-builds Dec 9, 2024
7ea0584
Removed failed assertions for SUBRESOURCE_FILTER and CSD_ALLOWLIST re…
AlexeyBarabash Dec 9, 2024
fb7792f
Hide arrow button in Safe Browsing section of brave://settings/security
emerick Dec 6, 2024
c4907d4
1.75.86
brave-builds Dec 9, 2024
459bf33
Improve contrast on active tab for dark mode (#26928)
aguscruiz Dec 9, 2024
64f1067
1.75.87
brave-builds Dec 9, 2024
c75cbce
Fix News dangling ptr crash
DJAndries Dec 6, 2024
6ae345a
Add 3-second timer for HTTPS upgrades before falling back to HTTP on …
StephenHeaps Dec 9, 2024
821f639
fix(wallet): Allow Creating Wallet on Buy Screen (#26850)
Douglashdaniel Dec 9, 2024
da1e9f5
Remove obsolete ProfileMenuViewBase patch and override
emerick Dec 9, 2024
0cfde8b
don't override critical codeowner entries (#26944)
bridiver Dec 9, 2024
ef737ca
Fixes a crash on Quick Search on Android when TemplateUrlService is n…
SergeyZhukovsky Dec 9, 2024
847322a
1.75.88
brave-builds Dec 10, 2024
50a6e2e
[Webpack]: Remove unused url-loader
fallaciousreasoning Dec 9, 2024
c749d8e
[Overrides]: Move interface registration to brave_content_renderer_cl…
fallaciousreasoning Dec 10, 2024
45369d9
1.75.89
brave-builds Dec 10, 2024
f7f6769
[iOS] Add constellation support for NTT p3a metrics
kylehickinson Dec 4, 2024
28b9585
[ads] Remove ShouldLaunchBraveAdsAsInProcessService feature
aseren Dec 9, 2024
8df49c9
1.75.90
brave-builds Dec 10, 2024
71d4eaa
AI Chat: android should use tab-default conversation in the popup
petemill Dec 10, 2024
b108641
[iOS] - Update text for playlist quick-action button (#26930)
Brandon-T Dec 10, 2024
e71db2c
Partial l10n for VPN widget.
mkarolin Dec 9, 2024
9c63fe8
Bump nanoid from 3.3.7 to 3.3.8 (#26948)
dependabot[bot] Dec 10, 2024
8056c3f
[ads] Optimize database queries serialization/deserialization overhead
aseren Dec 4, 2024
12dbe76
[ads] Change Brave Ads tests to use async DB calls.
aseren Dec 8, 2024
7146285
[ads] Make brave_ads::Database class internal to ads.
aseren Dec 10, 2024
c6be4e6
[ads] Disable NotificationAdPopupBrowserTest
aseren Dec 10, 2024
951d084
[iOS] Remove Third-Party mentions in VPN. Change AppStore to App Stor…
Brandon-T Dec 10, 2024
e0e5712
[Rewards 3.0] Validate explore card links and thumbnails
zenparsing Dec 10, 2024
5d9cf7b
Upgrade News direct feed requests to HTTPS when possible
DJAndries Dec 4, 2024
316e018
Call News fetcher delegate on UI thread
DJAndries Dec 6, 2024
2bc3367
Use `base::WeakPtr` for `DirectFeedFetcher::Delegate` call
DJAndries Dec 10, 2024
8f1c654
1.75.91
brave-builds Dec 11, 2024
abfdfae
Don't show toast notifications when copying links or images
emerick Dec 10, 2024
604edd9
[AI Chat] Introduces support for host-specific distiller scripts (#25…
jonathansampson Dec 11, 2024
cecf928
1.75.92
brave-builds Dec 11, 2024
dd15dec
[iOS] - Inject VPN subscription info on script message (#26969)
Brandon-T Dec 12, 2024
7e00b8d
Do not allow configuring tabs with javascript no matter what (#26932)
Brandon-T Dec 12, 2024
433d4b4
[AI Chat]: Update Android UI to open AI Chat in a tab (#26823)
fallaciousreasoning Dec 12, 2024
36b4987
Upgrade from Chromium 132.0.6834.33 to Chromium 132.0.6834.46 (#26985)
emerick Dec 12, 2024
8f6a56e
Brave Account `brave://settings` UI.
szilardszaloki Oct 4, 2024
8fc4471
Removes the "Account name" input field.
szilardszaloki Dec 10, 2024
fa938a3
AI Chat becomes a trusted WebUI with an UntrustedWebUI frame for LLM-…
petemill Dec 12, 2024
5f5193b
1.75.93
brave-builds Dec 12, 2024
a4fe90f
1.75.94
brave-builds Dec 12, 2024
899a5a6
modify default screenshot shortcut to use the accelerator key (#26993)
jonathansampson Dec 12, 2024
dc561bf
1.75.95
brave-builds Dec 12, 2024
390a23e
Disable v2 ext on toggle turning off. Added the `Remove` button for d…
boocmp Dec 12, 2024
7cceb83
[iOS] - Get rid of Window Render Script (#26992)
Brandon-T Dec 12, 2024
70aa9b3
[iOS] - Fix race condition for private browsing only mode (#26931)
Brandon-T Dec 12, 2024
b8e4c39
fix(wallet): Post Confirmation Transfer Value
Douglashdaniel Dec 9, 2024
8fb9484
style(wallet): Edit Gas Slider Track
Douglashdaniel Dec 9, 2024
870c490
fix(wallet): Prevent Double Account Creation on Buy Screen
Douglashdaniel Dec 10, 2024
d6f426f
fix(wallet): Backup Wallet Progress Indicator
Douglashdaniel Dec 10, 2024
200a52e
fix(wallet): Speedup Transaction
Douglashdaniel Dec 10, 2024
4aeae6a
[NTP Search]: Change color to browser theme
fallaciousreasoning Dec 12, 2024
446cb40
1.75.96
brave-builds Dec 12, 2024
f0395ed
[iOS] Add local search to Playlist
kylehickinson Nov 25, 2024
1e9f640
Update leo dependency
petemill Dec 12, 2024
d2b154b
[iOS] - Fix brave://flags crash (#26986)
Brandon-T Dec 12, 2024
91d4cf5
feature(privacy): Add debug view to iOS to display blocked requests p…
StephenHeaps Dec 12, 2024
f6cece3
[iOS] Add new browser menu UI (#26805)
kylehickinson Dec 12, 2024
36bddcf
1.75.97
brave-builds Dec 12, 2024
5b21110
Remove toast notification for adding article to reading list
emerick Dec 12, 2024
718fa7a
[Rewards 3.0] Add creator ID parameter to Rewards page
zenparsing Dec 12, 2024
c5c8329
[AI Chat]: Make it possible to Open AI Chat when history is disabled …
fallaciousreasoning Dec 12, 2024
a10066a
1.75.98
brave-builds Dec 13, 2024
80124af
[ads] Add search result ad clicked InfoBar
aseren Sep 4, 2024
f3acda4
Implement height-based animation for Toast on iOS
aseren Nov 20, 2024
604f4c0
[iOS] Fix request desktop site action in new menu UI
kylehickinson Dec 13, 2024
f36b473
Upgrade direct feed redirect requests to HTTPS, respect strict upgrad…
DJAndries Dec 12, 2024
4f34de3
Add News Direct feed redirect test
DJAndries Dec 13, 2024
74e6911
Added Custom Scriptlet section in the settings page. (#25999)
boocmp Dec 13, 2024
fbad66b
[AI Chat] allow clipboard-write in conversation entries frame
petemill Dec 12, 2024
55d2551
1.75.99
brave-builds Dec 13, 2024
f2c1a5f
Add shardtree crate (#26966)
cypt4 Dec 13, 2024
1f0d310
[Android] Fix for default action on opening link
samartnik Dec 12, 2024
c11f0e7
1.75.100
brave-builds Dec 13, 2024
52a0cd3
[iOS] - Revert SkusScript MethodIDs (#27010)
Brandon-T Dec 13, 2024
3f57cb6
Update nala dependency
petemill Dec 13, 2024
a9f9ba1
[iOS] - Add New-Line to localizable.strings (#27015)
Brandon-T Dec 13, 2024
695acda
[ZCash ] Implement shard tree and shard storage (#26477)
cypt4 Dec 13, 2024
9aab46c
Fixes missing Russian l10n for two strings. (#26981)
mkarolin Dec 13, 2024
e342038
enable AIChatHistory feature for android and desktop
petemill Dec 12, 2024
7a19c31
AI Chat storage notice is dismissed after first prompt sending or clo…
petemill Dec 12, 2024
cc27904
Fix `BraveStatsUpdater` instantiation
DJAndries Dec 13, 2024
98653e6
AssistantResponse uses key for events
petemill Dec 12, 2024
1834ac3
AI Chat conversations list item menu and edit improvements
petemill Dec 12, 2024
669bd2d
Don't crash when editing the title of a conversation not in-memory
petemill Dec 12, 2024
5c3b3d2
Revert "Disable CustomBackgroundFileManagerBrowserTest.SaveImageMulti…
mihaiplesa Dec 14, 2024
7a1a9bf
Replaced tab group icon in bookmarks bar
simonhong Dec 7, 2024
9092f0e
1.75.101
brave-builds Dec 16, 2024
d9ef39a
Added separator to inactive split view tab
simonhong Dec 12, 2024
bc3ceba
Applied latest split view bg color to priv/tor window
simonhong Dec 13, 2024
aedf3e6
Updated active/hover bg color of inactive tab in split view
simonhong Dec 13, 2024
68e7e53
Temporary disabled flacky test. (#27021)
boocmp Dec 16, 2024
473dfa3
Using Nala color provider for Speedreader. (#27022)
boocmp Dec 16, 2024
79b1db6
Await for element in list. (#27026)
boocmp Dec 16, 2024
8faefd2
1.75.102
brave-builds Dec 16, 2024
ef57f0d
Replaced lint-suppressions.xml.patch with python chromium_src overrid…
AlexeyBarabash Dec 16, 2024
8701b30
style(wallet): Fix Cut Off Brave Logo
Douglashdaniel Dec 13, 2024
d251078
1.75.103
brave-builds Dec 16, 2024
06978b2
feat(wallet): Cancel & Speed Up Tx in Tx Status Screen (#26947)
nuo-xu Dec 16, 2024
797d374
Remove workaround for crbug.com/6013664 (#27028)
atuchin-m Dec 16, 2024
eef895f
(Wallet) Fix crash KeystoreHelper class (#27027)
simoarpe Dec 16, 2024
eba9642
Use precomputed `caller` in the file save dialog title. (#26953)
goodov Dec 16, 2024
9a79330
Fix YouTube creator detection for search navigations
zenparsing Dec 16, 2024
fd859e2
Allows to use a microphone for Brave Talk in the background on Android
SergeyZhukovsky Dec 16, 2024
b709d02
Element Picker on Android (#26725)
vadimstruts Dec 16, 2024
a450ebb
1.75.104
brave-builds Dec 17, 2024
4ad3ba7
[AI Chat] disable history feature enabled by default on Android
petemill Dec 17, 2024
5d628da
[AI Chat] WebManifest for PWA install
petemill Dec 13, 2024
131a842
Use color favicon for AI Chat
petemill Dec 16, 2024
238e21c
AI Chat gets conversation title as Tab title and better PWA name
petemill Dec 16, 2024
37f9c31
1.75.105
brave-builds Dec 17, 2024
d3f2a3f
fix(ios): update tab bar visibility after ChromeWebViewController is …
nuo-xu Dec 17, 2024
ade4fdc
1.75.106
brave-builds Dec 17, 2024
5400766
fix(vpn): Centre alignment on text in server selection pop-up (#27034)
nuo-xu Dec 17, 2024
140a9f6
Fix enable_speedreader buildflag to be !is_ios instead of true
emerick Dec 16, 2024
7223262
[ads] AdsServiceImpl code health
aseren Dec 17, 2024
7ee1b03
Fixed wrong gap between tab and toolbar
simonhong Dec 17, 2024
024cebd
1.75.107
brave-builds Dec 18, 2024
8c298dc
Make sure sync URL is set to sane value if .env is not configured. (#…
goodov Dec 18, 2024
f9873da
1.75.108
brave-builds Dec 18, 2024
73b3497
1.75.109
brave-builds Dec 18, 2024
f16d1fe
Add feature flag for new onboarding
deeppandya Dec 12, 2024
4db9ab0
Removing dayzero changes and update onboarding with new flag
deeppandya Dec 12, 2024
fb5c43e
Add android exception
deeppandya Dec 17, 2024
f14c354
Remove lottie animation
deeppandya Nov 25, 2024
469cd53
Add static image as we removed the animation
deeppandya Dec 12, 2024
363b349
Add dark image res
deeppandya Dec 17, 2024
7d4dd07
[AI Chat]: Android history setting (#26988)
fallaciousreasoning Dec 18, 2024
0c13841
codeowner - new WebUI should use RegisterChromeWebUIConfigs (#27057)
bridiver Dec 18, 2024
483d888
[Rewards 3.0] Provide a fallback thumbnail for explore cards
zenparsing Dec 18, 2024
da70331
1.75.110
brave-builds Dec 18, 2024
bc30921
Update Leo help links (#27051)
diracdeltas Dec 18, 2024
7f1f0e7
1.75.111
brave-builds Dec 19, 2024
48f845d
Fix dangling pointer crash in ZCashRpc (#27062)
cypt4 Dec 19, 2024
d3847dd
1.75.112
brave-builds Dec 19, 2024
9bb15fc
(Wallet) Check if asset array contains null values (#27067)
simoarpe Dec 19, 2024
5d1c007
1.75.113
brave-builds Dec 19, 2024
b27c32c
update renovate.json
mihaiplesa Dec 19, 2024
4f9fa6b
fix(ios): Fix user sometimes cannot scroll the tab bar (#27061)
nuo-xu Dec 19, 2024
ed79055
fix(wallet): Transactions Partner Modal Bugs
Douglashdaniel Dec 19, 2024
1aa8077
add brave-ai-chat-page-context flag (#27065)
thypon Dec 19, 2024
88e4a04
1.75.114
brave-builds Dec 20, 2024
808c33e
Upgrade from Chromium 132.0.6834.46 to Chromium 132.0.6834.57 (#27073)
emerick Dec 20, 2024
357c803
1.75.115
brave-builds Dec 20, 2024
6144164
Prevent external favicons fetch on password manager page. (#27066)
goodov Dec 20, 2024
e05c752
[iOS] - Fix alert continuation leak when WebKit automatically cancels…
Brandon-T Dec 20, 2024
45af846
separate alerting origin from download origin (#27049)
diracdeltas Dec 20, 2024
508a284
1.75.116
brave-builds Dec 20, 2024
bc0bac2
fix(vpn): fix sometimes server region list is not populated after rel…
nuo-xu Dec 20, 2024
07d4ea8
Add metric configuration and alternative metric attributes
DJAndries Nov 26, 2024
2842027
Address P3A metric config feedback
DJAndries Dec 4, 2024
1837a63
Adds preferences and methods to delete Leo conversations on Android (…
SergeyZhukovsky Dec 20, 2024
c2ec032
1.75.117
brave-builds Dec 23, 2024
19ba1a0
Roll perf profiles update (update-perf-profile-2024-12-22-16-16) (#27…
brave-builds Dec 23, 2024
86463e0
1.75.118
brave-builds Dec 23, 2024
bca3254
1.75.119
brave-builds Dec 23, 2024
052190f
[iOS] - Fix URL-Bar logic handling about:blank (#27080)
Brandon-T Dec 23, 2024
5600f45
fix(vpn): display country name for Singapore server selection (#27088)
nuo-xu Dec 23, 2024
480fa7f
fix(wallet): fix wallet currency is not updating correctly (#27070)
nuo-xu Dec 23, 2024
f3403cb
1.75.120
brave-builds Dec 24, 2024
47bdfe6
Do not require screenlock on ChromeOS for passwords sync (#27056)
AlexeyBarabash Dec 24, 2024
22fd74c
1.75.121
brave-builds Dec 24, 2024
400b805
[ZCash] Fetch consensus branch id from the backend (#27089)
cypt4 Dec 24, 2024
f85519c
1.75.122
brave-builds Dec 24, 2024
82f849f
1.75.123
brave-builds Dec 25, 2024
291cbfe
1.75.124
brave-builds Dec 25, 2024
7464671
1.75.125
brave-builds Dec 25, 2024
719b8b5
1.75.126
brave-builds Dec 26, 2024
fd46063
1.75.127
brave-builds Dec 26, 2024
bfc06c7
Improve android rebooting in perf tests (#27093)
atuchin-m Dec 26, 2024
165e0e6
1.75.128
brave-builds Dec 26, 2024
9bc156a
Remove cross promo dialog
deeppandya Dec 17, 2024
6b0e974
1.75.129
brave-builds Dec 27, 2024
4c299aa
1.75.130
brave-builds Dec 27, 2024
42931e4
feat(wallet): add Base to preloaded EVM networks (#27013)
onyb Dec 27, 2024
8ed9a06
1.75.131
brave-builds Dec 27, 2024
aaa5b5d
Add proprietary_codecs:true to perf chromium build (#27096)
atuchin-m Dec 27, 2024
d280ebd
1.75.132
brave-builds Dec 30, 2024
beea032
1.75.133
brave-builds Dec 30, 2024
37563e4
Roll perf profiles update (update-perf-profile-2024-12-29-16-16) (#27…
brave-builds Dec 30, 2024
9570066
fix(wallet): Remove Bridge To Aurora Button
Douglashdaniel Dec 18, 2024
db0adeb
1.75.134
brave-builds Dec 30, 2024
0e04dda
Adding Crowdin integration to l10n scripts.
mkarolin Feb 7, 2024
941c4d2
Code Review fixes.
mkarolin Dec 13, 2024
e02e7a5
Added timeouts to requests.get calls.
mkarolin Dec 13, 2024
852c505
1.75.135
brave-builds Dec 31, 2024
65ae106
Wallet openssl ed25519 (#26770)
supermassive Dec 31, 2024
630f624
Fix UNSAFE_TODO for wallet [part 4 of N] (#26854)
supermassive Dec 31, 2024
211a36a
1.75.136
brave-builds Dec 31, 2024
7fe013c
feat(wallet): Add Activity to Portfolio Desktop View
Douglashdaniel Dec 30, 2024
a795de9
1.75.137
brave-builds Dec 31, 2024
b515b6c
1.75.138
brave-builds Jan 1, 2025
b5c5299
1.75.139
brave-builds Jan 1, 2025
a7a2cc9
1.75.140
brave-builds Jan 1, 2025
52ad91c
Fix ephemeral storage service unit test when the profile doesn't hav…
Ilie-Lesan Jan 2, 2025
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
17 changes: 17 additions & 0 deletions components/ephemeral_storage/ephemeral_storage_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include "base/timer/timer.h"
#include "brave/components/ephemeral_storage/ephemeral_storage_pref_names.h"
#include "brave/components/ephemeral_storage/url_storage_checker.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/user_prefs/user_prefs.h"
Expand All @@ -35,6 +39,14 @@ GURL GetFirstPartyStorageURL(const std::string& ephemeral_domain) {
return GURL(base::StrCat({url::kHttpsScheme, "://", ephemeral_domain}));
}

bool DoesProfileHaveAnyBrowserWindow(Profile* profile) {
for (Browser* browser : chrome::FindAllBrowsersWithProfile(profile)) {
if (browser->window())
return true;
}
return false;
}

} // namespace

EphemeralStorageService::EphemeralStorageService(
Expand Down Expand Up @@ -327,6 +339,11 @@ void EphemeralStorageService::ScheduleFirstPartyStorageAreasCleanupOnStartup() {

void EphemeralStorageService::CleanupFirstPartyStorageAreasOnStartup() {
DCHECK(!context_->IsOffTheRecord());
Profile* profile = Profile::FromBrowserContext(context_);
if (!DoesProfileHaveAnyBrowserWindow(profile)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, now I'm thinking: shouldn't we instead start the cleanup process timer when a regular profile window is created (or exists) for context_?

right now if you open a normal window with an existing incognito window, the cleanup won't run.

Copy link
Contributor Author

@Ilie-Lesan Ilie-Lesan Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I saw in the code, there are two situations that trigger the cleanup.

  1. At startup, there is a 5-second keep-alive timer after which the cleanup is executed(so if you are quick enough to enter the URL in the address bar, the cleanup is aborted)
  2. After closing a tab, there is a 30-second grace period (this option is enabled by default) after which all data cleanup is started.

Are you running in one of these situations? Can you please add some steps to reproduce? Thanks!

first_party_storage_areas_to_cleanup_on_startup_.clear();
return;
}
ScopedListPrefUpdate pref_update(prefs_, kFirstPartyStorageOriginsToCleanup);
for (const auto& url_to_cleanup :
first_party_storage_areas_to_cleanup_on_startup_) {
Expand Down