Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: content/browser/dom_storage/dom_storage_area.cc

Issue 1136123006: Tweak DOMStorageArea rate limit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use suggested values Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_area.cc
diff --git a/content/browser/dom_storage/dom_storage_area.cc b/content/browser/dom_storage/dom_storage_area.cc
index 67c7b98ac1ad2daa431256da55079eadbd02a822..e76f5c94d5e1806bf265ac74ed1e57ce0af97d98 100644
--- a/content/browser/dom_storage/dom_storage_area.cc
+++ b/content/browser/dom_storage/dom_storage_area.cc
@@ -37,8 +37,8 @@ const int kCommitDefaultDelaySecs = 5;
// To avoid excessive IO we apply limits to the amount of data being written
// and the frequency of writes. The specific values used are somewhat arbitrary.
-const int kMaxBytesPerDay = kPerStorageAreaQuota * 2;
-const int kMaxCommitsPerHour = 6;
+const int kMaxBytesPerHour = kPerStorageAreaQuota;
+const int kMaxCommitsPerHour = 60;
} // namespace
@@ -109,7 +109,7 @@ DOMStorageArea::DOMStorageArea(const GURL& origin,
is_shutdown_(false),
commit_batches_in_flight_(0),
start_time_(base::TimeTicks::Now()),
- data_rate_limiter_(kMaxBytesPerDay, base::TimeDelta::FromHours(24)),
+ data_rate_limiter_(kMaxBytesPerHour, base::TimeDelta::FromHours(1)),
commit_rate_limiter_(kMaxCommitsPerHour, base::TimeDelta::FromHours(1)) {
if (!directory.empty()) {
base::FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_));
@@ -134,7 +134,7 @@ DOMStorageArea::DOMStorageArea(int64 namespace_id,
is_shutdown_(false),
commit_batches_in_flight_(0),
start_time_(base::TimeTicks::Now()),
- data_rate_limiter_(kMaxBytesPerDay, base::TimeDelta::FromHours(24)),
+ data_rate_limiter_(kMaxBytesPerHour, base::TimeDelta::FromHours(1)),
commit_rate_limiter_(kMaxCommitsPerHour, base::TimeDelta::FromHours(1)) {
DCHECK(namespace_id != kLocalStorageNamespaceId);
if (session_storage_backing) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698