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

Unified Diff: chrome/renderer/resources/extensions/web_request_custom_bindings.js

Issue 11574006: Implement chrome.downloads.onDeterminingFilename() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r185012 Created 7 years, 10 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/resources/extensions/web_request_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/web_request_custom_bindings.js b/chrome/renderer/resources/extensions/web_request_custom_bindings.js
index 8699cbff664b6b488355836f0831625a713b01a1..9a458dedb8bc59a57456672e13ae50a5cd162b23 100644
--- a/chrome/renderer/resources/extensions/web_request_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/web_request_custom_bindings.js
@@ -59,6 +59,9 @@ WebRequestEvent.prototype.addListener =
function(cb, opt_filter, opt_extraInfo) {
if (!this.eventOptions_.supportsListeners)
throw new Error('This event does not support listeners.');
+ // NOTE(benjhayden) New APIs should not use this subEventName trick! It does
+ // not play well with event pages. See downloads.onDeterminingFilename and
+ // ExtensionDownloadsEventRouter for an alternative approach.
var subEventName = GetUniqueSubEventName(this.eventName_);
// Note: this could fail to validate, in which case we would not add the
// subEvent listener.

Powered by Google App Engine
This is Rietveld 408576698