Skip to content

Commit

Permalink
[DevTools] Add notification of storage being limited in Incognito mode
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Harley Li authored and Commit Bot committed Mar 11, 2019
1 parent 5851206 commit 457c13d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion front_end/resources/ClearStorageView.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ Resources.ClearStorageView = class extends UI.ThrottledWidget {
return;
}
this._quotaRow.textContent = Common.UIString(
'%s used out of %s storage quota', Number.bytesToString(response.usage), Number.bytesToString(response.quota));
'%s used out of %s storage quota.\u00a0', Number.bytesToString(response.usage),
Number.bytesToString(response.quota));
if (response.quota < 125829120) { // 120 MB
this._quotaRow.title = ls`Storage quota is limited in Incognito mode`;
this._quotaRow.appendChild(UI.Icon.create('smallicon-info'));
}

if (!this._quotaUsage || this._quotaUsage !== response.usage) {
this._quotaUsage = response.usage;
Expand Down

0 comments on commit 457c13d

Please sign in to comment.