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

Unified Diff: chrome/renderer/extensions/app_bindings.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
Index: chrome/renderer/extensions/app_bindings.cc
diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc
index 28dee80061546a9343ad9f8ccf130970bb9a5bf1..5a495a7bd14bd5208622b6c7c667b2816adcbc58 100644
--- a/chrome/renderer/extensions/app_bindings.cc
+++ b/chrome/renderer/extensions/app_bindings.cc
@@ -20,6 +20,7 @@
#include "extensions/renderer/console.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/extension_helper.h"
+#include "extensions/renderer/renderer_extension_registry.h"
#include "extensions/renderer/script_context.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -75,7 +76,7 @@ v8::Local<v8::Value> AppBindings::GetDetailsImpl(blink::WebLocalFrame* frame) {
return v8::Null(isolate);
const Extension* extension =
- dispatcher_->extensions()->GetExtensionOrAppByURL(
+ RendererExtensionRegistry::Get()->GetExtensionOrAppByURL(
frame->document().url());
if (!extension)
@@ -116,7 +117,8 @@ void AppBindings::GetRunningState(
// from the top frame.
blink::WebSecurityOrigin top_frame_security_origin =
context()->web_frame()->top()->securityOrigin();
- const ExtensionSet* extensions = dispatcher_->extensions();
+ const RendererExtensionRegistry* extensions =
+ RendererExtensionRegistry::Get();
// The app associated with the top level frame.
const Extension* top_app = extensions->GetHostedAppByURL(

Powered by Google App Engine
This is Rietveld 408576698