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

Unified Diff: chrome/browser/extensions/extension_web_ui.cc

Issue 8827013: Move/replace/rename URL-based extension getters from ExtensionService to/in ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: origins Created 9 years 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/browser/extensions/extension_web_ui.cc
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index d576deab809892f856d07008d6c6ed327ca027e2..ecc4c7ca7019313007424a6b0f4d94ce933a5dfd 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -67,7 +67,7 @@ class ExtensionWebUIImageLoadingTracker : public ImageLoadingTracker::Observer {
// disabled in incognito mode.
ExtensionService* service = profile->GetExtensionService();
if (service)
- extension_ = service->GetExtensionByURL(page_url);
+ extension_ = service->extensions()->GetByURL(ExtensionURLInfo(page_url));
}
void Init() {
@@ -130,9 +130,8 @@ ExtensionWebUI::ExtensionWebUI(TabContents* tab_contents, const GURL& url)
Profile* profile =
Profile::FromBrowserContext(tab_contents->browser_context());
ExtensionService* service = profile->GetExtensionService();
- const Extension* extension = service->GetExtensionByURL(url);
- if (!extension)
- extension = service->GetExtensionByWebExtent(url);
+ const Extension* extension =
+ service->extensions()->GetByURL(ExtensionURLInfo(url));
DCHECK(extension);
// Only hide the url for internal pages (e.g. chrome-extension or packaged
// component apps like bookmark manager.
@@ -224,7 +223,8 @@ bool ExtensionWebUI::HandleChromeURLOverride(
}
// Verify that the extension that's being referred to actually exists.
- const Extension* extension = service->GetExtensionByURL(extension_url);
+ const Extension* extension =
+ service->extensions()->GetByURL(ExtensionURLInfo(extension_url));
if (!extension) {
// This can currently happen if you use --load-extension one run, and
// then don't use it the next. It could also happen if an extension

Powered by Google App Engine
This is Rietveld 408576698