Skip to content

Commit 457c13d

Browse files
Harley LiCommit Bot
authored andcommitted
[DevTools] Add notification of storage being limited in Incognito mode
Add a message telling users that storage quota is limited in Incognito mode (why: crbug 800329 comment \#1). In non-Incognito mode, the quota is in gigabytes. But in Incognito, the quota cap is no more than 120MB. Bug: 794269, 800329 Change-Id: Ic0d9e9d40119424c0b44bdd314d1f836af4ed357 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506462 Commit-Queue: Haihong Li (Harley) <[email protected]> Reviewed-by: Erik Luo <[email protected]> Cr-Commit-Position: refs/heads/master@{#639677}
1 parent 5851206 commit 457c13d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

front_end/resources/ClearStorageView.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ Resources.ClearStorageView = class extends UI.ThrottledWidget {
210210
return;
211211
}
212212
this._quotaRow.textContent = Common.UIString(
213-
'%s used out of %s storage quota', Number.bytesToString(response.usage), Number.bytesToString(response.quota));
213+
'%s used out of %s storage quota.\u00a0', Number.bytesToString(response.usage),
214+
Number.bytesToString(response.quota));
215+
if (response.quota < 125829120) { // 120 MB
216+
this._quotaRow.title = ls`Storage quota is limited in Incognito mode`;
217+
this._quotaRow.appendChild(UI.Icon.create('smallicon-info'));
218+
}
214219

215220
if (!this._quotaUsage || this._quotaUsage !== response.usage) {
216221
this._quotaUsage = response.usage;

0 commit comments

Comments
 (0)