summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/WebRequestContext.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-10-27 09:58:13 +0100
committerSteve Block <steveblock@google.com>2010-10-27 14:07:30 +0100
commit9a90c4fd9e9ad727fac52b12013ad2b88644d826 (patch)
treec3cfb89596caf61a7375295d5aa6a4a712f28301 /WebKit/android/WebCoreSupport/WebRequestContext.h
parentf8d8851981c0c0605a653850bddde79841119470 (diff)
downloadexternal_webkit-9a90c4fd9e9ad727fac52b12013ad2b88644d826.zip
external_webkit-9a90c4fd9e9ad727fac52b12013ad2b88644d826.tar.gz
external_webkit-9a90c4fd9e9ad727fac52b12013ad2b88644d826.tar.bz2
Fix WebRequestContext::get() to be threadsafe
This allows the method to be called from both the WebCore thread and the UI thread, as required to hook up CookieManager. Change-Id: I895d14909b14f0baba77fb2cb75926d9103ee01f
Diffstat (limited to 'WebKit/android/WebCoreSupport/WebRequestContext.h')
-rw-r--r--WebKit/android/WebCoreSupport/WebRequestContext.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.h b/WebKit/android/WebCoreSupport/WebRequestContext.h
index 3f5631f..788998e 100644
--- a/WebKit/android/WebCoreSupport/WebRequestContext.h
+++ b/WebKit/android/WebCoreSupport/WebRequestContext.h
@@ -38,6 +38,9 @@ public:
virtual const std::string& GetAcceptLanguage() const;
// Lazily create the relevant context. This class holds a reference.
+ // This may be called on any thread. The context returned, however, is not
+ // threadsafe, and should only be used on a single thread (the network stack
+ // IO thread), with the exception of the methods below.
static WebRequestContext* get(bool isPrivateBrowsing);
// These methods are threadsafe.