commit | 4ff7b40b01046d703b33c4c96a491fdb923d20cd | [log] [tgz] |
---|---|---|
author | csharrison <[email protected]> | Sat Nov 12 04:41:22 2016 |
committer | Commit bot <[email protected]> | Sat Nov 12 04:46:31 2016 |
tree | 76a3c17dae5c303635a75930f92613b10106cc08 | |
parent | e2f937b068269d3740e84e46163d9b5276e7f485 [diff] [blame] |
[extensions] Stop parsing webstore urls so much The following hooks parse the webstore url per request, sometimes twice. - OnHeadersReceived - OnResponseStarted - OnBeforeRequest - OnBeforeSendHeaders - OnSendHeaders - OnCompleted This accounts for ~3% of task CPU time on the IO thread from loading http://cr.kungfoo.net/loading/1000spacers/ on Linux. This patch just caches the url at the ExtensionsClient layer, so we never have to do this more than once. BUG=664174 Review-Url: https://codereview.chromium.org/2493053002 Cr-Commit-Position: refs/heads/master@{#431771}
diff --git a/extensions/common/extensions_client.h b/extensions/common/extensions_client.h index 328731a2..754565f 100644 --- a/extensions/common/extensions_client.h +++ b/extensions/common/extensions_client.h
@@ -106,7 +106,7 @@ virtual std::string GetWebstoreBaseURL() const = 0; // Returns the URL to use for update manifest queries. - virtual std::string GetWebstoreUpdateURL() const = 0; + virtual const GURL& GetWebstoreUpdateURL() const = 0; // Returns a flag indicating whether or not a given URL is a valid // extension blacklist URL.