summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 20:00:11 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-15 20:00:11 +0000
commit6c270d442c1ee1a526538b8530e6198a9ada90e4 (patch)
tree5e5ccfbcd54cc59bbb250a233cf128df9dac5fab /chrome
parente10d86c2067313fa2cdc8684b5f0904b0d8d985e (diff)
downloadchromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.zip
chromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.tar.gz
chromium_src-6c270d442c1ee1a526538b8530e6198a9ada90e4.tar.bz2
1) Tell the AppCacheService which request context to use when fetching resources for updates. Done for both chrome and test_shell. The service does not yet take a reference to that context, because the extra reference apparently gives some tests grief.
2) Added methods to generate new storage ids for different object types on the IO thread. BUG=none TEST=none Review URL: http://codereview.chromium.org/195077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26253 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/profile.cc6
-rw-r--r--chrome/common/appcache/chrome_appcache_service.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index f4fb817..de7f949 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -224,7 +224,8 @@ class OffTheRecordProfileImpl : public Profile,
virtual ChromeAppCacheService* GetAppCacheService() {
if (!appcache_service_.get()) {
appcache_service_ = new ChromeAppCacheService();
- appcache_service_->InitializeOnUIThread(GetPath(), true);
+ appcache_service_->InitializeOnUIThread(
+ GetPath(), GetRequestContext(), true);
}
return appcache_service_.get();
}
@@ -780,7 +781,8 @@ Profile* ProfileImpl::GetOriginalProfile() {
ChromeAppCacheService* ProfileImpl::GetAppCacheService() {
if (!appcache_service_.get()) {
appcache_service_ = new ChromeAppCacheService();
- appcache_service_->InitializeOnUIThread(GetPath(), false);
+ appcache_service_->InitializeOnUIThread(
+ GetPath(), GetRequestContext(), false);
}
return appcache_service_.get();
}
diff --git a/chrome/common/appcache/chrome_appcache_service.h b/chrome/common/appcache/chrome_appcache_service.h
index 63736da..3dd6082 100644
--- a/chrome/common/appcache/chrome_appcache_service.h
+++ b/chrome/common/appcache/chrome_appcache_service.h
@@ -33,8 +33,10 @@ class ChromeAppCacheService
}
void InitializeOnUIThread(const FilePath& data_directory,
+ URLRequestContext* request_context,
bool is_incognito) {
DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
+ set_request_context(request_context);
// Some test cases run without an IO thread.
MessageLoop* io_thread = ChromeThread::GetMessageLoop(ChromeThread::IO);