summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache_interceptor.cc9
-rw-r--r--webkit/appcache/appcache_interceptor.h8
-rw-r--r--webkit/glue/webkitclient_impl.cc4
3 files changed, 12 insertions, 9 deletions
diff --git a/webkit/appcache/appcache_interceptor.cc b/webkit/appcache/appcache_interceptor.cc
index 969b513..1c76df4 100644
--- a/webkit/appcache/appcache_interceptor.cc
+++ b/webkit/appcache/appcache_interceptor.cc
@@ -13,15 +13,20 @@
namespace appcache {
+// static
+AppCacheInterceptor* AppCacheInterceptor::GetInstance() {
+ return Singleton<AppCacheInterceptor>::get();
+}
+
void AppCacheInterceptor::SetHandler(
net::URLRequest* request, AppCacheRequestHandler* handler) {
- request->SetUserData(instance(), handler); // request takes ownership
+ request->SetUserData(GetInstance(), handler); // request takes ownership
}
AppCacheRequestHandler* AppCacheInterceptor::GetHandler(
net::URLRequest* request) {
return reinterpret_cast<AppCacheRequestHandler*>(
- request->GetUserData(instance()));
+ request->GetUserData(GetInstance()));
}
void AppCacheInterceptor::SetExtraRequestInfo(
diff --git a/webkit/appcache/appcache_interceptor.h b/webkit/appcache/appcache_interceptor.h
index 5a7acfd..a13dcc6 100644
--- a/webkit/appcache/appcache_interceptor.h
+++ b/webkit/appcache/appcache_interceptor.h
@@ -22,7 +22,7 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
// Registers a singleton instance with the net library.
// Should be called early in the IO thread prior to initiating requests.
static void EnsureRegistered() {
- CHECK(instance());
+ CHECK(GetInstance());
}
// Must be called to make a request eligible for retrieval from an appcache.
@@ -38,6 +38,8 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
int64* cache_id,
GURL* manifest_url);
+ static AppCacheInterceptor* GetInstance();
+
protected:
// Overridde from net::URLRequest::Interceptor:
virtual net::URLRequestJob* MaybeIntercept(net::URLRequest* request);
@@ -48,10 +50,6 @@ class AppCacheInterceptor : public net::URLRequest::Interceptor {
private:
friend struct DefaultSingletonTraits<AppCacheInterceptor>;
- static AppCacheInterceptor* instance() {
- return Singleton<AppCacheInterceptor>::get();
- }
-
AppCacheInterceptor();
virtual ~AppCacheInterceptor();
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 12d5702..42e1d1d8 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -61,7 +61,7 @@ namespace {
class MemoryUsageCache {
public:
// Retrieves the Singleton.
- static MemoryUsageCache* Get() {
+ static MemoryUsageCache* GetInstance() {
return Singleton<MemoryUsageCache>::get();
}
@@ -499,7 +499,7 @@ static size_t memoryUsageMBGeneric() {
static size_t getMemoryUsageMB(bool bypass_cache) {
size_t current_mem_usage = 0;
- MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::Get();
+ MemoryUsageCache* mem_usage_cache_singleton = MemoryUsageCache::GetInstance();
if (!bypass_cache &&
mem_usage_cache_singleton->IsCachedValueValid(&current_mem_usage))
return current_mem_usage;