diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:30:15 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-21 23:30:15 +0000 |
commit | 438c97d23785f28465304e1cb521b5125e9ea469 (patch) | |
tree | 5bc5c6ae6c72b9c8567c13a0b32d491b25e81f88 /chrome/browser/extensions/extensions_quota_service.h | |
parent | 69e297f187425f2b31db37bfe51af86f28c38275 (diff) | |
download | chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.zip chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.tar.gz chromium_src-438c97d23785f28465304e1cb521b5125e9ea469.tar.bz2 |
Update extension functions to always pass a list of arguments, even when one argument was passed.
BUG=36301
TEST=Updated tests and ran all the existing tests.
Review URL: http://codereview.chromium.org/2137012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_quota_service.h')
-rw-r--r-- | chrome/browser/extensions/extensions_quota_service.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extensions_quota_service.h b/chrome/browser/extensions/extensions_quota_service.h index 700f9cc..b2999ab 100644 --- a/chrome/browser/extensions/extensions_quota_service.h +++ b/chrome/browser/extensions/extensions_quota_service.h @@ -43,7 +43,7 @@ class ExtensionsQuotaService { // Returns true if the request is fine and can proceed, false if the request // should be throttled and an error returned to the extension. bool Assess(const std::string& extension_id, ExtensionFunction* function, - const Value* args, const base::TimeTicks& event_time); + const ListValue* args, const base::TimeTicks& event_time); private: friend class ExtensionTestQuotaResetFunction; typedef std::map<std::string, QuotaLimitHeuristics> FunctionHeuristicsMap; @@ -136,7 +136,8 @@ class QuotaLimitHeuristic { // occurs while parsing |args|, the function aborts - buckets may be non- // empty). The expectation is that invalid args and associated errors are // handled by the ExtensionFunction itself so we don't concern ourselves. - virtual void GetBucketsForArgs(const Value* args, BucketList* buckets) = 0; + virtual void GetBucketsForArgs(const ListValue* args, + BucketList* buckets) = 0; }; // Ownership of |mapper| is given to the new QuotaLimitHeuristic. @@ -148,7 +149,7 @@ class QuotaLimitHeuristic { // implementation of a derived class) to perform an operation with |args|, // based on the history of similar operations with similar arguments (which // is retrieved using the BucketMapper). - bool ApplyToArgs(const Value* args, const base::TimeTicks& event_time); + bool ApplyToArgs(const ListValue* args, const base::TimeTicks& event_time); protected: const Config& config() { return config_; } |