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

Unified Diff: extensions/browser/quota_service.h

Issue 704453002: Allow extension function call quota to be un-throttled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 6 years, 1 month 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 | extensions/browser/quota_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/quota_service.h
diff --git a/extensions/browser/quota_service.h b/extensions/browser/quota_service.h
index 1dd55699e3eb7e0c427f5904df213674353391a0..ff985f44d28a53750e5631edb4082b92902d3384 100644
--- a/extensions/browser/quota_service.h
+++ b/extensions/browser/quota_service.h
@@ -64,12 +64,9 @@ class QuotaService : public base::NonThreadSafe {
// All QuotaLimitHeuristic instances in this map are owned by us.
typedef std::map<FunctionName, QuotaLimitHeuristics> FunctionHeuristicsMap;
- // Purge resets all accumulated data (except |violation_errors_|) as if the
- // service was just created. Called periodically so we don't consume an
- // unbounded amount of memory while tracking quota. Yes, this could mean an
- // extension gets away with murder if it is timed right, but the extensions
- // we are trying to limit are ones that consistently violate, so we'll
- // converge to the correct set.
+ // Purge resets all accumulated data as if the service was just created.
+ // Called periodically so we don't consume an unbounded amount of memory
+ // while tracking quota.
void Purge();
void PurgeFunctionHeuristicsMap(FunctionHeuristicsMap* map);
base::RepeatingTimer<QuotaService> purge_timer_;
@@ -81,12 +78,6 @@ class QuotaService : public base::NonThreadSafe {
// Each heuristic will be evaluated and ANDed together to get a final answer.
std::map<ExtensionId, FunctionHeuristicsMap> function_heuristics_;
- // For now, as soon as an extension violates quota, we don't allow it to
- // make any more requests to quota limited functions. This provides a quick
- // lookup for these extensions that is only stored in memory.
- typedef std::map<std::string, std::string> ViolationErrorMap;
- ViolationErrorMap violation_errors_;
-
DISALLOW_COPY_AND_ASSIGN(QuotaService);
};
« no previous file with comments | « no previous file | extensions/browser/quota_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698