OSDN Git Service

Provide a URLRequestContext directly to AutoFill, rather than a factory function
authorSteve Block <steveblock@google.com>
Tue, 30 Nov 2010 11:32:14 +0000 (11:32 +0000)
committerSteve Block <steveblock@google.com>
Tue, 30 Nov 2010 11:34:07 +0000 (11:34 +0000)
commit5e3a2a384c4607e2e9f6fe7b49a5c1faa670f3d8
tree4f67d91da8d429dd1591058e2bb1283f54fdd23c
parent8f71a88eb32d112e6277f0a0260df04e969d6f8a
Provide a URLRequestContext directly to AutoFill, rather than a factory function

In b/3044989, AutoFill was modified to take a factory function for the
URLRequestContext (which was then created when needed), rather than
taking the context directly. This was to avoid a race condition where
the context is created before the required storage paths have been
synced to the WebCore thread through the BrowserFrame.

Since https://android-git.corp.google.com/g/76579 and
https://android-git.corp.google.com/g/80056, we read the required
paths directly from JniUtils, so the race condition no longer exists. We
can therefore provide the context directly to AutoFill.

Note that while the context may be created before the Settings have been
synced to the WebCore thread, the necessary properties will be updated
as part of this sync before the context is used.

This change will also simplify things when we use one context per
WebView.

Also requires a change in external/chromium ...
https://android-git.corp.google.com/g/82146

Change-Id: Idfc34d435bae21654a02e5898aef0e84da98218a
WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp