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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 12390076: Attaching a DOM Activity Logger to all extension scripts (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 9 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 | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/dom_activity_logger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/dispatcher.cc
===================================================================
--- chrome/renderer/extensions/dispatcher.cc (revision 186214)
+++ chrome/renderer/extensions/dispatcher.cc (working copy)
@@ -28,6 +28,7 @@
#include "chrome/renderer/extensions/chrome_v8_extension.h"
#include "chrome/renderer/extensions/content_watcher.h"
#include "chrome/renderer/extensions/context_menus_custom_bindings.h"
+#include "chrome/renderer/extensions/dom_activity_logger.h"
#include "chrome/renderer/extensions/event_bindings.h"
#include "chrome/renderer/extensions/extension_custom_bindings.h"
#include "chrome/renderer/extensions/extension_groups.h"
@@ -57,6 +58,7 @@
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "grit/renderer_resources.h"
+
#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
@@ -912,8 +914,16 @@
UpdateActiveExtensions();
- if (is_webkit_initialized_)
+ if (is_webkit_initialized_) {
InitOriginPermissions(extension);
+ // DOMActivity logger for a main world controlled by an extension (as in
+ // the case of an extension background page, options page, popup etc.)
+ // gets an empty title.
+ DOMActivityLogger::AttachToWorld(DOMActivityLogger::kMainWorldId,
+ extension_id,
+ extension->url(),
+ string16());
+ }
}
void Dispatcher::InitOriginPermissions(const Extension* extension) {
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/dom_activity_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698