Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/ext/background.js

Issue 6089548756942848: Issue 1496 - Extend workaround for Chrome bug breaking Flash videos to Chrome 38-39 (Closed)
Patch Set: Created Oct. 23, 2014, 3:28 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 var frameId; 312 var frameId;
313 if (requestType == "sub_frame") 313 if (requestType == "sub_frame")
314 frameId = details.parentFrameId; 314 frameId = details.parentFrameId;
315 else 315 else
316 frameId = details.frameId; 316 frameId = details.frameId;
317 317
318 frame = frames[frameId] || frames[Object.keys(frames)[0]]; 318 frame = frames[frameId] || frames[Object.keys(frames)[0]];
319 319
320 if (frame) 320 if (frame)
321 { 321 {
322 // Chrome 38 mistakenly reports requests of type 'object' 322 // Chrome 38 and 39 mistakenly reports requests of type 'object'
323 // (e.g. requests initiated by Flash) with the type 'other'. 323 // (e.g. requests initiated by Flash) with the type 'other'.
324 // https://code.google.com/p/chromium/issues/detail?id=410382 324 // https://code.google.com/p/chromium/issues/detail?id=410382
325 if (requestType == "other" && / Chrome\/38\b/.test(navigator.userAgent )) 325 if (requestType == "other" && / Chrome\/3[8-9]\b/.test(navigator.userA gent))
326 requestType = "object"; 326 requestType = "object";
327 327
328 if (!ext.webRequest.onBeforeRequest._dispatch(details.url, requestType , new Page({id: details.tabId}), frame)) 328 if (!ext.webRequest.onBeforeRequest._dispatch(details.url, requestType , new Page({id: details.tabId}), frame))
329 return {cancel: true}; 329 return {cancel: true};
330 } 330 }
331 } 331 }
332 332
333 if (isMainFrame || details.type == "sub_frame") 333 if (isMainFrame || details.type == "sub_frame")
334 frames[details.frameId] = {url: details.url, parent: frame}; 334 frames[details.frameId] = {url: details.url, parent: frame};
335 } 335 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 }; 370 };
371 371
372 return ext.onMessage._dispatch(message, sender, sendResponse); 372 return ext.onMessage._dispatch(message, sender, sendResponse);
373 }); 373 });
374 374
375 375
376 /* Storage */ 376 /* Storage */
377 377
378 ext.storage = localStorage; 378 ext.storage = localStorage;
379 })(); 379 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld