Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2762)

Unified Diff: chrome/common/extensions/chrome_extensions_client.h

Issue 2493053002: [extensions] Stop parsing webstore urls so much (Closed)
Patch Set: rdevlin review Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/chrome_extensions_client.h
diff --git a/chrome/common/extensions/chrome_extensions_client.h b/chrome/common/extensions/chrome_extensions_client.h
index b75404ad111afed2ee02dfc073f5c57b96b2a451..87b8f828f74d52fdddc6e40ea55ae430397825eb 100644
--- a/chrome/common/extensions/chrome_extensions_client.h
+++ b/chrome/common/extensions/chrome_extensions_client.h
@@ -14,6 +14,7 @@
#include "chrome/common/extensions/permissions/chrome_permission_message_provider.h"
#include "extensions/common/extensions_client.h"
#include "extensions/common/permissions/extensions_api_permissions.h"
+#include "url/gurl.h"
namespace extensions {
@@ -47,7 +48,7 @@ class ChromeExtensionsClient : public ExtensionsClient {
bool ShouldSuppressFatalErrors() const override;
void RecordDidSuppressFatalError() override;
std::string GetWebstoreBaseURL() const override;
- std::string GetWebstoreUpdateURL() const override;
+ const GURL& GetWebstoreUpdateURL() const override;
bool IsBlacklistUpdateURL(const GURL& url) const override;
std::set<base::FilePath> GetBrowserImagePaths(
const Extension* extension) override;
@@ -67,6 +68,9 @@ class ChromeExtensionsClient : public ExtensionsClient {
// added to this list.
ScriptingWhitelist scripting_whitelist_;
+ // Mutable to allow caching in a const method.
+ mutable GURL webstore_update_url_;
+
friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsClient>;
DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsClient);
« no previous file with comments | « chrome/browser/extensions/chrome_content_verifier_delegate.cc ('k') | chrome/common/extensions/chrome_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698