diff options
author | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 23:47:26 +0000 |
---|---|---|
committer | jyasskin@chromium.org <jyasskin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-18 23:47:26 +0000 |
commit | adf5f3543feadf581e3ba84d930efd18110ffa31 (patch) | |
tree | 0ffe74804f72f0d2c53992a5abfb86a5669cf44a /extensions/common/url_pattern.cc | |
parent | c75c62e4a3f1223fd252a835d314f5da0a839d42 (diff) | |
download | chromium_src-adf5f3543feadf581e3ba84d930efd18110ffa31.zip chromium_src-adf5f3543feadf581e3ba84d930efd18110ffa31.tar.gz chromium_src-adf5f3543feadf581e3ba84d930efd18110ffa31.tar.bz2 |
Optimize ExtensionAPI::IsAnyFeatureAvailableToContext from O(#features) to O(#children + log #features).
This also replaces O(N) string allocations with 1 and moves the top-level
feature check to the top of the function to provide a quick exit when the
context has full access.
And it adds an IsAvailable() overload taking a Feature to avoid the string
copies in GetFeatureDependency().
BUG=305000
Review URL: https://codereview.chromium.org/107473004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241706 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/url_pattern.cc')
0 files changed, 0 insertions, 0 deletions