To migrate to WKHTTPCookieStore we need to create WKHTTPSystemCookieStore that inherit from SystemCookieStore Then we can replace the usage of NSHTTPSystemCookieStore
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b22b849d5ef25579cdbbba34b126d93d540956b7 commit b22b849d5ef25579cdbbba34b126d93d540956b7 Author: Mohammad Refaat <mrefaat@chromium.org> Date: Tue Nov 07 01:59:57 2017 Create WKHTTPSystemCookieStore WKHTTPSystemCookieStore is a SystemCookieStore that uses WKHTTPCookieStore as its internal cookie store. WKHTTPCookieStore is an async store that does it's callbacks on the main thread, from there we post the systemCookieStore callbacks to the webthread. Also created system_cookie_store unit tests to be a generic unit tests for all classes that implements systemCookieStore, and added NSHTTPSystemCookieStore unit test delegate & WKHTTPSystemCookieStore unit test delegate to use it. Bug: 759229, 759227 , 779106 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: I7d100e1f3e27b3cffea66506a4d20e6bdbc44927 Reviewed-on: https://chromium-review.googlesource.com/741883 Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#514351} [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/net/BUILD.gn [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/net/cookies/ns_http_system_cookie_store_unittest.mm [add] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/net/cookies/system_cookie_store_unittest_template.h [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/testing/wait_util.h [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/testing/wait_util.mm [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/web/BUILD.gn [modify] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/web/net/cookies/BUILD.gn [add] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/web/net/cookies/wk_http_system_cookie_store.h [add] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/web/net/cookies/wk_http_system_cookie_store.mm [add] https://crrev.com/b22b849d5ef25579cdbbba34b126d93d540956b7/ios/web/net/cookies/wk_http_system_cookie_store_unittest.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8 commit 04349b4ff2adfb7fab7a44f19d9889d537d7d6c8 Author: mrefaat <mrefaat@chromium.org> Date: Wed Dec 06 02:18:19 2017 Update WKSystemCookieStore and CookieCreationTimeManager Thread usage. 1- Updates WKSystemCookieStore so it can use wkcookiestore only from the main thread. 2- Update the CookieCreationTimeManager to only be used on IO thread (aside from creation on Main thread) Bug: 779106,759229 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Ifa0f9e5bb2d2c33c488759467dc8a25403f6e0ed Reviewed-on: https://chromium-review.googlesource.com/809531 Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#521954} [modify] https://crrev.com/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8/ios/net/cookies/cookie_creation_time_manager.h [modify] https://crrev.com/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8/ios/net/cookies/cookie_creation_time_manager.mm [modify] https://crrev.com/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8/ios/net/cookies/system_cookie_store.h [modify] https://crrev.com/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8/ios/net/cookies/system_cookie_store.mm [modify] https://crrev.com/04349b4ff2adfb7fab7a44f19d9889d537d7d6c8/ios/web/net/cookies/wk_http_system_cookie_store.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a6501d96ec780bd2f60785d1187fe7f43e07dac8 commit a6501d96ec780bd2f60785d1187fe7f43e07dac8 Author: mrefaat <mrefaat@chromium.org> Date: Mon Dec 11 19:50:50 2017 Create SystemCookieStoreUtil to create WKHTTPSystemCookieStore. 1- Add Feature flag for WKSystemCookieStore usage. 2- Create SystemCookieStoreUtil to create the correct type of HTTPSystemCookieStore based on iOS version and the feature flag value. Bug: 779106,759229 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Ie4da0c3c49ede43e27368ef40162cdd7bc164a34 Reviewed-on: https://chromium-review.googlesource.com/809307 Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#523178} [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/chrome/browser/about_flags.mm [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/chrome/browser/ios_chrome_flag_descriptions.cc [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/chrome/browser/ios_chrome_flag_descriptions.h [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/BUILD.gn [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/features.mm [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/net/cookies/BUILD.gn [add] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/net/cookies/system_cookie_store_util.mm [add] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/net/cookies/system_cookie_store_util_unittest.mm [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/public/BUILD.gn [modify] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/public/features.h [add] https://crrev.com/a6501d96ec780bd2f60785d1187fe7f43e07dac8/ios/web/public/system_cookie_store_util.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573 commit 03b21ae3bbcfbad78f7fa3a85b5b5e9334580573 Author: mrefaat <mrefaat@chromium.org> Date: Wed Dec 13 22:39:43 2017 Integrate WKHTTPSystemCookieStore with request context getter. Use SystemCookieStoreUtil to provide the requestContextGetter with the correct base cookie store (either NSHTTPCookieStore or WKHTTPCookieStore). This means that when WKHTTPCookieStore feature flag is enabled and it's iOS11+ cookie store will be using WKHTTPCookieStore. Bug: 779106,759229 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I97695aef8c75d88861d0694c2cf4983447bfe128 Reviewed-on: https://chromium-review.googlesource.com/809744 Reviewed-by: Eugene But <eugenebut@chromium.org> Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Cr-Commit-Position: refs/heads/master@{#523921} [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/browser_state/BUILD.gn [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/browser_state/chrome_browser_state_impl_io_data.mm [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/browser_state/chrome_browser_state_io_data.h [rename] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/browser_state/chrome_browser_state_io_data.mm [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/browser_state/off_the_record_chrome_browser_state_io_data.mm [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/net/cookie_util.h [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/chrome/browser/net/cookie_util.mm [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/net/cookies/cookie_store_ios_persistent.h [modify] https://crrev.com/03b21ae3bbcfbad78f7fa3a85b5b5e9334580573/ios/net/cookies/cookie_store_ios_persistent.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/107d07bc68a516d5dccc620c98a7bcb5408b7dd2 commit 107d07bc68a516d5dccc620c98a7bcb5408b7dd2 Author: Mohammad Refaat <mrefaat@chromium.org> Date: Fri Feb 16 02:29:01 2018 Enable WKHTTPCookieStore usage by default for iOS 11+ Bug: 759229, 779106 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: Ia79cc0ba778e1b24de5cfddab2068f165b77d64e Reviewed-on: https://chromium-review.googlesource.com/922924 Reviewed-by: Eugene But <eugenebut@chromium.org> Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Cr-Commit-Position: refs/heads/master@{#537109} [modify] https://crrev.com/107d07bc68a516d5dccc620c98a7bcb5408b7dd2/ios/web/features.mm
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9abf20e4834015e7cbdb7939e487e80db2eec956 commit 9abf20e4834015e7cbdb7939e487e80db2eec956 Author: Mohammad Refaat <mrefaat@chromium.org> Date: Tue May 15 20:23:48 2018 Allow URLFetcher to use WKHTTPCookieStore With iOS11 there is API to access WKHTTPCookieStore and through WKHTTPSystemCookieStore, URLFetcher can use this api to set and get cookies from WKHTTPCookieStore This should fix PDF download problems, it also should allow suggestions queries to send cookies and will use cookies for NTP tiles. Bug: 779106, 831678 Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs Change-Id: I59637ebde557fae09cfd39105d84675724ac0140 Reviewed-on: https://chromium-review.googlesource.com/1050404 Commit-Queue: Mohammad Refaat <mrefaat@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#558824} [modify] https://crrev.com/9abf20e4834015e7cbdb7939e487e80db2eec956/ios/chrome/browser/net/BUILD.gn [modify] https://crrev.com/9abf20e4834015e7cbdb7939e487e80db2eec956/ios/chrome/browser/net/cookie_util.mm [modify] https://crrev.com/9abf20e4834015e7cbdb7939e487e80db2eec956/ios/chrome/browser/net/cookie_util_unittest.mm
Comment 1 by bugdroid1@chromium.org
, Nov 7 2017