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

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

Issue 101203008: Allow app_shell to run past extension manifest parsing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup register_manifest Created 6 years, 11 months 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_contents_observer.cc
diff --git a/chrome/browser/extensions/extension_web_contents_observer.cc b/chrome/browser/extensions/extension_web_contents_observer.cc
index 1afe72d2d48c51c5e8a7a3956e11da4c6b2051c1..6edd44328755ae9f287747f46e17c993362f19eb 100644
--- a/chrome/browser/extensions/extension_web_contents_observer.cc
+++ b/chrome/browser/extensions/extension_web_contents_observer.cc
@@ -16,6 +16,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/constants.h"
@@ -59,8 +60,7 @@ void ExtensionWebContentsObserver::RenderViewCreated(
// Some extensions use file:// URLs.
if (type == Manifest::TYPE_EXTENSION ||
type == Manifest::TYPE_LEGACY_PACKAGED_APP) {
- if (ExtensionSystem::Get(profile_)->extension_service()->
- extension_prefs()->AllowFileAccess(extension->id())) {
+ if (ExtensionPrefs::Get(profile_)->AllowFileAccess(extension->id())) {
content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
process->GetID(), content::kFileScheme);
}
@@ -119,7 +119,8 @@ const Extension* ExtensionWebContentsObserver::GetExtension(
if (!site.SchemeIs(kExtensionScheme))
return NULL;
- ExtensionService* service = profile_->GetExtensionService();
+ ExtensionService* service =
+ ExtensionSystem::Get(profile_)->extension_service();
if (!service)
return NULL;
@@ -132,7 +133,8 @@ const Extension* ExtensionWebContentsObserver::GetExtension(
// May be null if the extension doesn't exist, for example if somebody typos
// a chrome-extension:// URL.
- return service->extensions()->GetByID(site.host());
+ return ExtensionRegistry::Get(profile_)->enabled_extensions().GetByID(
+ site.host());
}
} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/runtime/runtime_api.cc ('k') | chrome/common/extensions/chrome_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698