Commit graph

46 commits

Author SHA1 Message Date
Cheng Zhao
53229e3d6c Fix network delegate race condition (#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
2018-02-26 06:23:59 -08:00
deepak1556
75c17cf846 Use generic base::Value::SetKey
Remove base::Value::SetDoubleWithoutPathExpansion
https://chromium-review.googlesource.com/591654

Remove base::Value::SetStringWithoutPathExpansion
https://chromium-review.googlesource.com/592368

Remove base::Value::SetIntegerWithoutPathExpansion
https://chromium-review.googlesource.com/591655
2018-02-23 10:21:23 +09:00
deepak1556
ebb0e46380 REVIEW: create AtomNetworkDelegate on the IO thread 2018-01-02 16:37:08 +09:00
deepak1556
90acb22a58 dont use UI methods on IO thread 2018-01-02 16:37:06 +09:00
Boik
d594092675 add a null-pointer check before processing base::SupportsUserData::GetUserData 2017-10-03 12:42:35 +08:00
Cheng Zhao
c34fb146f6 Fix styling 2017-09-13 21:40:29 +09:00
Boik
e66341ec59 add back the missing 'resourceType' property 2017-09-12 21:27:49 +08:00
Boik
a01abd0fee fix lint-cpp 2017-09-12 20:28:30 +08:00
Boik
2d771674bb get webContentsId instead 2017-09-12 20:17:11 +08:00
Boik
13d363d1f1 fix lint-cpp 2017-09-12 15:40:35 +08:00
Boik
549c30f9b2 first attempt to track the origin requesters of webRequest events 2017-09-12 15:40:35 +08:00
Haojian Wu
1b9780035c Remove redundant calls to smart pointer's get method. 2017-03-30 22:22:40 +02:00
Cheng Zhao
497f5a1199 Update files for Chrome 54 API changes 2017-01-19 09:05:59 +02:00
Cheng Zhao
f28e8d7168 Fix API changes of Chrome 53 2016-09-14 16:22:43 +09:00
bridiver
ca4cbe34a0 don't convert header names to nested values
fixes #6855
2016-08-15 17:21:14 -07:00
deepak1556
0e0235407b fill net::URLRequest details on IO thread 2016-06-09 10:39:18 +05:30
Cheng Zhao
7ba391da7c Update to API changes of Chrome 51 2016-05-23 10:59:39 +09:00
Brian R. Bondy
ff91aeb5d4 Iterator to use size_t 2016-05-13 11:07:17 +09:00
deepak1556
ddf962c6ea client_id is accessed on different threads 2016-04-19 10:01:38 +05:30
deepak1556
b8e04f4947 set client id on AtomNetworkDelegate instead of cmd line switch 2016-04-18 11:35:24 +05:30
deepak1556
fcf04377d7 set network emulation client id in request headers 2016-04-18 10:49:00 +05:30
Cheng Zhao
a07612c1ed Merge branch '5074-did-get-response-details-resource-type' of https://github.com/Mr0grog/electron into Mr0grog-5074-did-get-response-details-resource-type 2016-04-11 21:05:40 +09:00
Rob Brackett
1a842bf9d5 Fix trailing whitespace caught by linter. 2016-04-08 13:15:40 -07:00
Rob Brackett
c1b1348735 Add resourceType arg to webContents did-get-response-details event.
Fixes #5074 and follows @zcbenz's recommendation to expose ResourceTypeToString from atom_network_delegate publicly.
Also adds testing for other arguments to the `did-get-response-details` events, since there were no existing tests for them.
2016-04-08 11:19:36 -07:00
deepak1556
3fb39ad3ef provide option to override status line 2016-04-08 14:03:57 +05:30
deepak1556
4fc35a4587 session: webRequest.OnHeadersReceived should follow server redirect
Its required to follow server redirects.
2016-04-08 11:40:43 +05:30
Cheng Zhao
5fae63a2f5 Fix compilation errors on OS X 2016-03-10 17:06:21 +09:00
Robo
dc0151099c session: provide uploadData with webrequest api when available 2016-01-27 18:39:40 +05:30
Cheng Zhao
e96f89133c Reset whole headers when requestHeaders is set 2015-12-24 16:59:13 +08:00
Cheng Zhao
3e1edfc9d0 Cancel callback in OnComplete event 2015-12-23 10:20:59 +08:00
Cheng Zhao
c8c4381085 Cancel callback when URLRequest is destroyed 2015-12-22 23:35:23 +08:00
Cheng Zhao
9438d42322 Use generic function to handle events 2015-12-12 13:49:58 +08:00
Cheng Zhao
f976e1eda3 Add generic version for FillDetailsObject 2015-12-12 13:20:53 +08:00
Cheng Zhao
d3e723557e spec: Add test cases for webRequest 2015-12-12 11:31:19 +08:00
Cheng Zhao
fed94aada0 Make the webRequest listener asynchronous 2015-12-12 00:09:03 +08:00
Cheng Zhao
15cc8164b8 Use lower case for getters 2015-12-11 21:21:02 +08:00
Cheng Zhao
67886cf513 Parse filters in API code 2015-12-11 21:14:13 +08:00
Cheng Zhao
79a627014c Unify how listeners are handled 2015-12-11 21:02:44 +08:00
Cheng Zhao
9d406b695f Simpily the code that fills |details| 2015-12-11 20:40:39 +08:00
Cheng Zhao
e295eb0de7 Fix memory leak 2015-12-11 20:11:59 +08:00
Cheng Zhao
467e3b25b2 EvenTypes => EventType 2015-12-11 20:11:22 +08:00
Robo
658accab94 fix pointer usage 2015-12-11 00:25:25 +05:30
Robo
461ee49988 fix response headers modification 2015-12-09 20:14:18 +05:30
Robo
c5b5bbbeb2 add documentation 2015-12-09 20:14:18 +05:30
Robo
29f32c5ec7 support filtering event with url regex 2015-12-09 20:14:18 +05:30
Robo
13b5cab738 session: add webrequest api 2015-12-09 20:14:18 +05:30