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

Unified Diff: chrome/browser/chrome_content_browser_client.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: id 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/help_app_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 7cba0c3709bfd9b511e43ee1b3d5e935e5ae0c7e..51e29a20ad54c2ed5f53169faaac352ff3e68934 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -57,6 +57,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
@@ -178,7 +179,8 @@ RenderProcessHostPrivilege GetPrivilegeRequiredByUrl(
return PRIV_NORMAL;
if (url.SchemeIs(chrome::kExtensionScheme)) {
- const Extension* extension = service->GetExtensionByURL(url);
+ const Extension* extension =
+ service->extensions()->GetByID(url.host());
if (extension && extension->is_storage_isolated())
return PRIV_ISOLATED;
if (extension && extension->is_hosted_app())
@@ -376,8 +378,8 @@ GURL ChromeContentBrowserClient::GetEffectiveURL(
if (!profile || !profile->GetExtensionService())
return url;
- const Extension* extension =
- profile->GetExtensionService()->GetExtensionByWebExtent(url);
+ const Extension* extension = profile->GetExtensionService()->extensions()->
+ GetHostedAppByURL(ExtensionURLInfo(url));
if (!extension)
return url;
@@ -403,8 +405,8 @@ bool ChromeContentBrowserClient::ShouldUseProcessPerSite(
if (!profile || !profile->GetExtensionService())
return false;
- const Extension* extension =
- profile->GetExtensionService()->GetExtensionByURL(effective_url);
+ const Extension* extension = profile->GetExtensionService()->extensions()->
+ GetExtensionOrAppByURL(ExtensionURLInfo(effective_url));
if (!extension)
return false;
@@ -489,9 +491,8 @@ void ChromeContentBrowserClient::SiteInstanceGotProcess(
return;
const Extension* extension =
- service->GetExtensionByURL(site_instance->site());
- if (!extension)
- extension = service->GetExtensionByWebExtent(site_instance->site());
+ service->extensions()->GetExtensionOrAppByURL(ExtensionURLInfo(
+ site_instance->site()));
if (!extension)
return;
@@ -519,9 +520,8 @@ void ChromeContentBrowserClient::SiteInstanceDeleting(
return;
const Extension* extension =
- service->GetExtensionByURL(site_instance->site());
- if (!extension)
- extension = service->GetExtensionByWebExtent(site_instance->site());
+ service->extensions()->GetExtensionOrAppByURL(
+ ExtensionURLInfo(site_instance->site()));
if (!extension)
return;
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/help_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698