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

Unified Diff: chrome/browser/extensions/extension_function.h

Issue 10232004: Only apply extension throttling quota to sync, not local. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_function.h
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index b68fd0920f323b43586c59b1a5a95656bf84e281..0f9a6fa59e130356a5e3e705c858d94b63ff3128 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -84,10 +84,19 @@ class ExtensionFunction
// NULL-check.
virtual void Run();
+ // Gets whether quota should be applied to this individual function
+ // invocation. This is different to GetQuotaLimitHeuristics which is only
+ // invoked once and then cached.
+ //
+ // Returns false by default.
+ virtual bool ShouldSkipQuotaLimiting() const;
+
// Optionally adds one or multiple QuotaLimitHeuristic instances suitable for
// this function to |heuristics|. The ownership of the new QuotaLimitHeuristic
// instances is passed to the owner of |heuristics|.
// No quota limiting by default.
+ //
+ // Only called once per lifetime of the ExtensionsQuotaService.
virtual void GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const {}
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698