summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorrob@robwu.nl <rob@robwu.nl@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 20:08:45 +0000
committerrob@robwu.nl <rob@robwu.nl@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-18 20:08:45 +0000
commit810fee6552427459f7bf732b1ac61f375fdad107 (patch)
tree9e3c280db8af1178287f403ffd37cc988d1ef044 /extensions
parentee400fbec8fc9739cf508a8acefbeb58ce068068 (diff)
downloadchromium_src-810fee6552427459f7bf732b1ac61f375fdad107.zip
chromium_src-810fee6552427459f7bf732b1ac61f375fdad107.tar.gz
chromium_src-810fee6552427459f7bf732b1ac61f375fdad107.tar.bz2
Optimize GetExtensionOrAppIDByURL
When the function reaches this point in the code, then url.SchemeIs(kExtensionScheme) was false. So the condition will remain false in GetExtensionOrAppByURL, which makes this method equivalent to GetHostedAppByURL. Save some cycles by calling GetHostedAppByURL directly. Contributed by Rob Wu <rob@robwu.nl> BUG= Review URL: https://codereview.chromium.org/167493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r--extensions/common/extension_set.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/common/extension_set.cc b/extensions/common/extension_set.cc
index d68903b..77d4491 100644
--- a/extensions/common/extension_set.cc
+++ b/extensions/common/extension_set.cc
@@ -75,7 +75,7 @@ std::string ExtensionSet::GetExtensionOrAppIDByURL(const GURL& url) const {
if (url.SchemeIs(kExtensionScheme))
return url.host();
- const Extension* extension = GetExtensionOrAppByURL(url);
+ const Extension* extension = GetHostedAppByURL(url);
if (!extension)
return std::string();