Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: webkit/appcache/appcache_service.h

Issue 215024: Fix appcache_service and request_context referencing. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/appcache/chrome_appcache_service.h ('k') | webkit/appcache/appcache_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_service.h
===================================================================
--- webkit/appcache/appcache_service.h (revision 26601)
+++ webkit/appcache/appcache_service.h (working copy)
@@ -34,7 +34,7 @@
// If a load fails the object pointer will be NULL.
virtual void CacheLoadedCallback(AppCache* cache, int64 cache_id) = 0;
- virtual void GroupLoadedCallback(AppCacheGroup* cache,
+ virtual void GroupLoadedCallback(AppCacheGroup* group,
const GURL& manifest_url) = 0;
};
@@ -44,12 +44,12 @@
void Initialize(const FilePath& cache_directory);
// Context for use during cache updates, should only be accessed
- // on the IO thread.
- URLRequestContext* request_context() { return request_context_.get(); }
+ // on the IO thread. We do NOT add a reference to the request context,
+ // it is the callers responsibility to ensure that the pointer
+ // remains valid while set.
+ URLRequestContext* request_context() const { return request_context_; }
void set_request_context(URLRequestContext* context) {
- // TODO(michaeln): need to look into test failures that occur
- // when we take this reference? Stubbing out for now.
- // request_context_ = context;
+ request_context_ = context;
}
// TODO(jennb): API to set service settings, like file paths for storage
@@ -62,7 +62,7 @@
return (it != backends_.end()) ? it->second : NULL;
}
- // Track what we have in or in-memory cache.
+ // Track what we have in our in-memory cache.
void AddCache(AppCache* cache);
void RemoveCache(AppCache* cache);
void AddGroup(AppCacheGroup* group);
@@ -117,7 +117,7 @@
FilePath cache_directory_;
// Context for use during cache updates.
- scoped_refptr<URLRequestContext> request_context_;
+ URLRequestContext* request_context_;
// TODO(michaeln): cache and group loading book keeping.
// TODO(michaeln): database and response storage
« no previous file with comments | « chrome/common/appcache/chrome_appcache_service.h ('k') | webkit/appcache/appcache_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698