summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-09-30 11:53:33 +0100
committerSteve Block <steveblock@google.com>2010-10-01 12:01:48 +0100
commitad9d1f8f641a8800bcfcb19fbf988621229f0360 (patch)
treece13b29720914e520a32fe907175f2a54455834f
parent08ef6dc844161417a99f45546abb6e798410d0de (diff)
downloadexternal_webkit-ad9d1f8f641a8800bcfcb19fbf988621229f0360.zip
external_webkit-ad9d1f8f641a8800bcfcb19fbf988621229f0360.tar.gz
external_webkit-ad9d1f8f641a8800bcfcb19fbf988621229f0360.tar.bz2
Update WebRequestContext static getters to return pointers to the base class
This allows us to use these static getters with Chromium APIs which can use only the Chromium base class, not the Android derived class. Change-Id: I9690ef00a775cff2b580ae5c0c745d7b24021a4c
-rw-r--r--WebKit/android/WebCoreSupport/PlatformBridge.cpp4
-rw-r--r--WebKit/android/WebCoreSupport/WebRequest.cpp2
-rw-r--r--WebKit/android/WebCoreSupport/WebRequestContext.cpp8
-rw-r--r--WebKit/android/WebCoreSupport/WebRequestContext.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
index f02f6b7..abfb3bb 100644
--- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp
+++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp
@@ -68,7 +68,7 @@ void PlatformBridge::setCookies(const Document* document, const KURL& url, const
#if USE(CHROME_NETWORK_STACK)
std::string cookieValue(value.utf8().data());
GURL cookieGurl(url.string().utf8().data());
- WebRequestContext* androidContext;
+ URLRequestContext* androidContext;
if (document->settings() && document->settings()->privateBrowsingEnabled())
androidContext = WebRequestContext::GetAndroidPrivateBrowsingContext();
else
@@ -87,7 +87,7 @@ String PlatformBridge::cookies(const Document* document, const KURL& url)
{
#if USE(CHROME_NETWORK_STACK)
GURL cookieGurl(url.string().utf8().data());
- WebRequestContext* androidContext;
+ URLRequestContext* androidContext;
if (document->settings() && document->settings()->privateBrowsingEnabled())
androidContext = WebRequestContext::GetAndroidPrivateBrowsingContext();
else
diff --git a/WebKit/android/WebCoreSupport/WebRequest.cpp b/WebKit/android/WebCoreSupport/WebRequest.cpp
index e440181..d24c6cc 100644
--- a/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -136,7 +136,7 @@ void WebRequest::start(bool isPrivateBrowsing)
if (m_request->url().SchemeIs("browser"))
return handleBrowserURL(m_request->url());
- scoped_refptr<WebRequestContext> context;
+ scoped_refptr<URLRequestContext> context;
if (!isPrivateBrowsing)
context = WebRequestContext::GetAndroidContext();
else
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.cpp b/WebKit/android/WebCoreSupport/WebRequestContext.cpp
index 5a0daef..eb22c49 100644
--- a/WebKit/android/WebCoreSupport/WebRequestContext.cpp
+++ b/WebKit/android/WebCoreSupport/WebRequestContext.cpp
@@ -52,8 +52,8 @@ static const char* const kCacheDirectory = "/webviewCacheChromium";
static const char* const kCookiesDatabaseFilenamePrivate = "/webviewCookiesChromiumPrivate.db";
static const char* const kCacheDirectoryPrivate = "/webviewCacheChromiumPrivate";
-static scoped_refptr<WebRequestContext> androidContext(0);
-static scoped_refptr<WebRequestContext> androidPrivateBrowsingContext(0);
+static scoped_refptr<URLRequestContext> androidContext(0);
+static scoped_refptr<URLRequestContext> androidPrivateBrowsingContext(0);
static WTF::Mutex androidPrivateBrowsingContextMutex;
WebRequestContext::WebRequestContext()
@@ -155,14 +155,14 @@ scoped_refptr<WebRequestContext> WebRequestContext::GetAndroidContextForPath(con
return androidContext;
}
-scoped_refptr<WebRequestContext> WebRequestContext::GetAndroidContext()
+scoped_refptr<URLRequestContext> WebRequestContext::GetAndroidContext()
{
if (!androidContext)
androidContext = GetAndroidContextForPath(kCookiesDatabaseFilename, kCacheDirectory);
return androidContext;
}
-scoped_refptr<WebRequestContext> WebRequestContext::GetAndroidPrivateBrowsingContext()
+scoped_refptr<URLRequestContext> WebRequestContext::GetAndroidPrivateBrowsingContext()
{
WTF::MutexLocker lock(androidPrivateBrowsingContextMutex);
diff --git a/WebKit/android/WebCoreSupport/WebRequestContext.h b/WebKit/android/WebCoreSupport/WebRequestContext.h
index 5008487..80b28a6 100644
--- a/WebKit/android/WebCoreSupport/WebRequestContext.h
+++ b/WebKit/android/WebCoreSupport/WebRequestContext.h
@@ -37,8 +37,8 @@ class WebRequestContext : public URLRequestContext {
public:
virtual const std::string& GetUserAgent(const GURL& url) const;
virtual const std::string& GetAcceptLanguage() const;
- static scoped_refptr<WebRequestContext> GetAndroidContext();
- static scoped_refptr<WebRequestContext> GetAndroidPrivateBrowsingContext();
+ static scoped_refptr<URLRequestContext> GetAndroidContext();
+ static scoped_refptr<URLRequestContext> GetAndroidPrivateBrowsingContext();
static bool CleanupPrivateBrowsingFiles(const std::string& databaseDirectory, const std::string& cacheDirectory);
static void SetUserAgent(WTF::String);