Remove singleton pattern from ImageFectherBridge.
This CL changes ImageFetcherBridge behaviour for different profiles. Today, ImageFectherBridge is singleton, so there is only one instance created for one regular and multiple incognito profiles on Android. To avoid data leak between profiles, we need to create different instances for each profile. By this CL; - Each call to |ImageFectherBridge#getForProfile| function creates an instance of ImageFectherBridge that stores profile as member variable. - Each call to any other function of ImageFectherBridge will directly hit the native services through native bridge. - Native image_fetcher_bridge is a wrapper to reach the service that belongs to the given profile. There is no member functions anymore, but all are static. Bug: 1075562, 1041781, 1083923 Change-Id: Ic96d1c8fa1a7bd093abcf8939375f8934fd3cd92 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231124 Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org> Reviewed-by:Filip Gorski <fgorski@chromium.org> Reviewed-by:
Ramin Halavati <rhalavati@chromium.org> Cr-Commit-Position: refs/heads/master@{#779817}
Showing
This diff is collapsed.
Please register or sign in to comment