summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-11-30 11:32:14 +0000
committerSteve Block <steveblock@google.com>2010-11-30 11:34:07 +0000
commit5e3a2a384c4607e2e9f6fe7b49a5c1faa670f3d8 (patch)
tree4f67d91da8d429dd1591058e2bb1283f54fdd23c /WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
parent8f71a88eb32d112e6277f0a0260df04e969d6f8a (diff)
downloadexternal_webkit-5e3a2a384c4607e2e9f6fe7b49a5c1faa670f3d8.zip
external_webkit-5e3a2a384c4607e2e9f6fe7b49a5c1faa670f3d8.tar.gz
external_webkit-5e3a2a384c4607e2e9f6fe7b49a5c1faa670f3d8.tar.bz2
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
Diffstat (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
index 8199aa0..98b250f 100644
--- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
+++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
@@ -49,18 +49,13 @@
namespace android
{
-static URLRequestContext* webAutoFillContextGetter()
-{
- return WebRequestContext::get(false /* isPrivateBrowsing */);
-}
-
WebAutoFill::WebAutoFill()
: mWebViewCore(0)
{
mFormManager = new FormManager();
mQueryId = 1;
- AndroidURLRequestContextGetter::Get()->SetURLRequestContextGetterFunction(&webAutoFillContextGetter);
+ AndroidURLRequestContextGetter::Get()->SetURLRequestContext(WebRequestContext::get(false /* isPrivateBrowsing */));
AndroidURLRequestContextGetter::Get()->SetIOThread(WebUrlLoaderClient::ioThread());
mTabContents = new TabContents();
mAutoFillManager = new AutoFillManager(mTabContents.get());