Quota: Implement DetermineStoragePressure().
This function will allow QuotaManager to identify the state of
storage pressure when given information about disk capacity and usage.
QuotaManager will ultimately use this signal to dispatch a storage pressure event to script.
This change also moves the kStoragePressureEvent flag from content_features to quota_features so that it can be accessed from quota code, and content can never be included in storage.
This flag will remain accessible from content.
Design Doc: https://docs.google.com/document/d/1-ZzFe7ITnzW-G7uymhv_obPwfQjJwzA6wh10tfl5tCw/edit
Bug: 1088004
Change-Id: I84387f0599dde3404ffbae9014bf389bd0039ba0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252032
Commit-Queue: Lexi Stavrakos <[email protected]>
Reviewed-by: Jarryd Goodman <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Reviewed-by: Darwin Huang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#790575}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 5ed8c3f..3899a251 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -164,6 +164,7 @@
#include "services/media_session/public/cpp/features.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/network_switches.h"
+#include "storage/browser/quota/quota_features.h"
#include "third_party/blink/public/common/experiments/memory_ablation_experiment.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/forcedark/forcedark_switches.h"
@@ -3995,7 +3996,7 @@
{"enable-storage-pressure-event",
flag_descriptions::kStoragePressureEventName,
flag_descriptions::kStoragePressureEventDescription, kOsAll,
- FEATURE_VALUE_TYPE(features::kStoragePressureEvent)},
+ FEATURE_VALUE_TYPE(storage::features::kStoragePressureEvent)},
{"enable-storage-pressure-ui", flag_descriptions::kStoragePressureUIName,
flag_descriptions::kStoragePressureUIDescription, kOsAll,