From b84030fc8163cde1f8f055973ef63d3e1670bf52 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 29 Nov 2010 17:18:33 +0000 Subject: Use one WebRequestContext per WebView This change switches from using a pair of WebRequestContexts (one for private browsing, one for regular browsing) to using one WebRequestContext per WebView. This is required to allow us to set the userAgent on each WebView. The WebRequestContext is now owned by the WebView. Bug: 3113804 Change-Id: Iba2b1490e7ce4ff65c08a04a310963fa2c7e4f83 --- WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp') diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp index 73a8460..2d92b4b 100644 --- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp +++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp @@ -61,7 +61,9 @@ void WebAutoFill::init() return; mFormManager = new FormManager(); - AndroidURLRequestContextGetter::Get()->SetURLRequestContext(WebRequestContext::get(false /* isPrivateBrowsing */)); + // We use the WebView's WebRequestContext, which may be a private browsing context. + ASSERT(mWebViewCore); + AndroidURLRequestContextGetter::Get()->SetURLRequestContext(mWebViewCore->webRequestContext()); AndroidURLRequestContextGetter::Get()->SetIOThread(WebUrlLoaderClient::ioThread()); mTabContents = new TabContents(); mAutoFillManager = new AutoFillManager(mTabContents.get()); -- cgit v1.1