 Issue 6228201961422848:
  Issue 2064 - Configure indistinguishable request types in the abstraction layer  (Closed)
    
  
    Issue 6228201961422848:
  Issue 2064 - Configure indistinguishable request types in the abstraction layer  (Closed) 
  | Index: chrome/ext/background.js | 
| =================================================================== | 
| --- a/chrome/ext/background.js | 
| +++ b/chrome/ext/background.js | 
| @@ -331,6 +331,23 @@ | 
| handlerBehaviorChanged: chrome.webRequest.handlerBehaviorChanged | 
| }; | 
| + // Since Chrome 38 requests of type 'object' (e.g. requests | 
| + // initiated by Flash) are mistakenly reported with the type 'other'. | 
| + // https://code.google.com/p/chromium/issues/detail?id=410382 | 
| + if (parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) | 
| + { | 
| + ext.webRequest.indistinguishableTypes = [ | 
| + ["OTHER", "OBJECT", "OBJECT_SUBREQUEST", "MEDIA", "FONT"] | 
| 
Wladimir Palant
2015/03/02 19:12:18
This will overshoot. With the previous approach, a
 
Sebastian Noack
2015/03/02 19:23:11
I felt that it's more correct this way. But fair e
 | 
| + ]; | 
| + } | 
| + else | 
| + { | 
| + ext.webRequest.indistinguishableTypes = [ | 
| + ["OBJECT", "OBJECT_SUBREQUEST"], | 
| + ["OTHER", "MEDIA", "FONT"] | 
| + ]; | 
| + } | 
| + | 
| chrome.tabs.query({}, function(tabs) | 
| { | 
| tabs.forEach(function(tab) | 
| @@ -404,12 +421,6 @@ | 
| if (frame) | 
| { | 
| - // Since Chrome 38 requests of type 'object' (e.g. requests | 
| - // initiated by Flash) are mistakenly reported with the type 'other'. | 
| - // https://code.google.com/p/chromium/issues/detail?id=410382 | 
| - if (requestType == "OTHER" && parseInt(navigator.userAgent.match(/\bChrome\/(\d+)/)[1], 10) >= 38) | 
| - requestType = "OBJECT"; | 
| - | 
| var results = ext.webRequest.onBeforeRequest._dispatch( | 
| url, | 
| requestType, |