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

Unified Diff: content/browser/appcache/chrome_appcache_service.cc

Issue 10916132: AppCache and StoragePartition'ing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
Index: content/browser/appcache/chrome_appcache_service.cc
===================================================================
--- content/browser/appcache/chrome_appcache_service.cc (revision 156155)
+++ content/browser/appcache/chrome_appcache_service.cc (working copy)
@@ -9,6 +9,8 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/resource_context.h"
#include "net/base/net_errors.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "webkit/appcache/appcache_storage_impl.h"
#include "webkit/quota/quota_manager.h"
using content::BrowserThread;
@@ -22,13 +24,20 @@
void ChromeAppCacheService::InitializeOnIOThread(
const FilePath& cache_path,
content::ResourceContext* resource_context,
+ net::URLRequestContextGetter* request_context_getter,
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
cache_path_ = cache_path;
resource_context_ = resource_context;
- set_request_context(resource_context->GetRequestContext());
+ // The |request_context_getter| can be NULL in some unit tests.
+ // TODO(awong): TestProfile is difficult to work with. The
+ // SafeBrowsing tests require that GetRequestContext return NULL
+ // so we can't depend on having a non-NULL value here. See crbug/149783.
+ if (request_context_getter)
+ set_request_context(request_context_getter->GetURLRequestContext());
+
// Init our base class.
Initialize(
cache_path_,
« no previous file with comments | « content/browser/appcache/chrome_appcache_service.h ('k') | content/browser/appcache/chrome_appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698