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

Unified Diff: extensions/renderer/script_context.cc

Issue 1293673002: Create thread-safe RendererExtensionRegistry from ExtensionSet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « extensions/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/script_context.cc
diff --git a/extensions/renderer/script_context.cc b/extensions/renderer/script_context.cc
index 93214688f913cc0a009f392e918302d5d443cd8a..29eb83b08957d85293b2757e285f55dc74e5bc4e 100644
--- a/extensions/renderer/script_context.cc
+++ b/extensions/renderer/script_context.cc
@@ -16,11 +16,11 @@
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_api.h"
-#include "extensions/common/extension_set.h"
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/base_feature_provider.h"
#include "extensions/common/manifest_handlers/sandboxed_page_info.h"
#include "extensions/common/permissions/permissions_data.h"
+#include "extensions/renderer/renderer_extension_registry.h"
#include "gin/per_context_data.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -119,12 +119,12 @@ ScriptContext::~ScriptContext() {
}
// static
-bool ScriptContext::IsSandboxedPage(const ExtensionSet& extensions,
- const GURL& url) {
+bool ScriptContext::IsSandboxedPage(const GURL& url) {
// TODO(kalman): This is checking the wrong thing. See comment in
// HasAccessOrThrowError.
if (url.SchemeIs(kExtensionScheme)) {
- const Extension* extension = extensions.GetByID(url.host());
+ const Extension* extension =
+ RendererExtensionRegistry::Get()->GetByID(url.host());
if (extension) {
return SandboxedPageInfo::IsSandboxedPage(extension, url.path());
}
« no previous file with comments | « extensions/renderer/script_context.h ('k') | extensions/renderer/script_context_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698