Avoid parsing the webstore base url so much.
This is a followup to [1] which modified the extension url API to vend
GURLs rather than std::string for webstore update urls.
This patch does the same for the webstore base url
(the webstore "launch" url). We only parse this url in
ChromeResourceDispatcherHostDelegate::OnResponseStarted so there is less
of a performance win than [1], but still we should avoid doing needless
work.
Parsing this URL takes ~12% of the CPU time of
ResourceLoader::CompleteResponseStarted.
[1] https://codereview.chromium.org/2493053002/
BUG=664174
Review-Url: https://codereview.chromium.org/2506713002
Cr-Commit-Position: refs/heads/master@{#433963}
diff --git a/extensions/common/extensions_client.h b/extensions/common/extensions_client.h
index 754565f..87be859 100644
--- a/extensions/common/extensions_client.h
+++ b/extensions/common/extensions_client.h
@@ -103,7 +103,7 @@
virtual void RecordDidSuppressFatalError() = 0;
// Returns the base webstore URL prefix.
- virtual std::string GetWebstoreBaseURL() const = 0;
+ virtual const GURL& GetWebstoreBaseURL() const = 0;
// Returns the URL to use for update manifest queries.
virtual const GURL& GetWebstoreUpdateURL() const = 0;