Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / extensions / browser / api / storage / storage_api.cc
index a29bed8..38c8e71 100644 (file)
@@ -149,27 +149,19 @@ std::vector<std::string> GetKeys(const base::DictionaryValue& dict) {
 
 // Creates quota heuristics for settings modification.
 void GetModificationQuotaLimitHeuristics(QuotaLimitHeuristics* heuristics) {
-  QuotaLimitHeuristic::Config longLimitConfig = {
-    // See storage.json for current value.
-    core_api::storage::sync::MAX_WRITE_OPERATIONS_PER_HOUR,
-    base::TimeDelta::FromHours(1)
-  };
+  // See storage.json for the current value of these limits.
+  QuotaLimitHeuristic::Config short_limit_config = {
+      core_api::storage::sync::MAX_WRITE_OPERATIONS_PER_MINUTE,
+      base::TimeDelta::FromMinutes(1)};
+  QuotaLimitHeuristic::Config long_limit_config = {
+      core_api::storage::sync::MAX_WRITE_OPERATIONS_PER_HOUR,
+      base::TimeDelta::FromHours(1)};
+  heuristics->push_back(new QuotaService::TimedLimit(
+      short_limit_config, new QuotaLimitHeuristic::SingletonBucketMapper(),
+      "MAX_WRITE_OPERATIONS_PER_MINUTE"));
   heuristics->push_back(new QuotaService::TimedLimit(
-      longLimitConfig,
-      new QuotaLimitHeuristic::SingletonBucketMapper(),
+      long_limit_config, new QuotaLimitHeuristic::SingletonBucketMapper(),
       "MAX_WRITE_OPERATIONS_PER_HOUR"));
-
-  // A max of 10 operations per minute, sustained over 10 minutes.
-  QuotaLimitHeuristic::Config shortLimitConfig = {
-    // See storage.json for current value.
-    core_api::storage::sync::MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE,
-    base::TimeDelta::FromMinutes(1)
-  };
-  heuristics->push_back(new QuotaService::SustainedLimit(
-      base::TimeDelta::FromMinutes(10),
-      shortLimitConfig,
-      new QuotaLimitHeuristic::SingletonBucketMapper(),
-      "MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE"));
 };
 
 }  // namespace