Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r983860 unintentionally caused a network data path change for Android. This reverts to the data paths used before r983860. Any cookies saved since r983860 will be lost as a result of this CL, and instead the cookie store will revert back how it was before r983860. On Android (non-Webview), the default network context file paths under e.g. /data/user/0/org.chromium.chrome/app_chrome/ are: - `unsandboxed_data_path` - Default/ - `data_directory` - Default/Network/ and `trigger_migration` is set to false. Passing kDidNotAttemptToGrantSandboxAccess to CreateNetworkContextInternal causes IsSafeToUseDataPath to return 'true' and the `data_directory` is used for the cookie and other files meaning `data_directory` ('Default/Network') is used without a migration occurring. As GrantSandboxAccessOnThreadPool is never called, DCHECKs created to prevent this issue are not being hit. Setting this to kNoMigrationRequested means that IsSafeToUseDataPath now returns 'false' meaning that unsandboxed_data_path is used correctly as the main data path (as it was before r983860). For Webview, `unsandboxed_data_path` is never supplied (compare AwBrowserContext::ConfigureNetworkContextParams with ProfileNetworkContextService::ConfigureNetworkContextParamsInternal) and thus `data_directory` of 'Default/' is always correct and is is safe to pass kDidNotAttemptToGrantSandboxAccess. This is because migration is never supported on WebView due to a different threading model at network context creation. BUG=1309921 (cherry picked from commit b57cfc5) Change-Id: I176ce94c7feaa8da56011b62c28735efa78b952c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3671642 Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Reviewed-by: Bo Liu <boliu@chromium.org> Commit-Queue: Will Harris <wfh@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1008388} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3673604 Commit-Queue: Krishna Govind <govind@chromium.org> Owners-Override: Krishna Govind <govind@chromium.org> Reviewed-by: Will Harris <wfh@chromium.org> Cr-Commit-Position: refs/branch-heads/5060@{#347} Cr-Branched-From: b83393d-refs/heads/main@{#1002911}
- Loading branch information